diff --git a/lib/atomic/accounts/user.ex b/lib/atomic/accounts/user.ex index c86714ba5..b99913821 100644 --- a/lib/atomic/accounts/user.ex +++ b/lib/atomic/accounts/user.ex @@ -12,7 +12,7 @@ defmodule Atomic.Accounts.User do @required_fields ~w(email password role name)a @optional_fields ~w(course_id)a - @roles ~w(admin staff student)a + @roles ~w(admin student)a schema "users" do field :email, :string diff --git a/lib/atomic_web/controllers/user_registration_controller.ex b/lib/atomic_web/controllers/user_registration_controller.ex index 7ccfd9c92..094b4ba24 100644 --- a/lib/atomic_web/controllers/user_registration_controller.ex +++ b/lib/atomic_web/controllers/user_registration_controller.ex @@ -10,7 +10,7 @@ defmodule AtomicWeb.UserRegistrationController do conn = conn - |> assign(:roles, ~w(admin staff student)a) + |> assign(:roles, ~w(admin student)a) render(conn, "new.html", changeset: changeset) end diff --git a/priv/repo/seeds/accounts.exs b/priv/repo/seeds/accounts.exs index a73986b84..58a9c04f1 100644 --- a/priv/repo/seeds/accounts.exs +++ b/priv/repo/seeds/accounts.exs @@ -99,51 +99,6 @@ defmodule Atomic.Repo.Seeds.Accounts do ] |> create_users(:student) - [ - "Bo Peep", - "Bugs Bunny", - "Buzz Lightyear", - "Captain Hook", - "Clara Cluck", - "Clarabelle Cow", - "Cruella de Vil", - "Daisy Duck", - "Dewey Duck", - "Doc Hudson", - "Donald Duck", - "Eddie Valiant", - "Horace Horsecollar", - "Huey Duck", - "Jessica Rabbit", - "Judge Doom", - "Lightning McQueen", - "Little John", - "Louie Duck", - "Maid Marian", - "Max Goof", - "Mickey Mouse", - "Minnie Mouse", - "Mortimer Mouse", - "Peter Pan", - "Potato Head", - "Prince John", - "Queen of Hearts", - "Robin Hood", - "Roger Rabbit", - "Sally Carrera", - "Scrooge McDuck", - "Speedy Gonzalez", - "Sheriff of Nottingham", - "Snow White", - "Tiger Lily", - "Tinker Bell", - "Tweedle Dee", - "Tweedle Dum", - "Wendy Darling", - "White Rabbit" - ] - |> create_users(:staff) - _ -> Mix.shell().error("Found users, aborting seeding users.") end diff --git a/test/support/factories/accounts_factory.ex b/test/support/factories/accounts_factory.ex index b852fa5ef..edef51bf5 100644 --- a/test/support/factories/accounts_factory.ex +++ b/test/support/factories/accounts_factory.ex @@ -7,7 +7,7 @@ defmodule Atomic.Factories.AccountFactory do defmacro __using__(_opts) do quote do - @roles ~w(admin staff student)a + @roles ~w(admin student)a def user_factory do %User{ diff --git a/test/support/factories/organizations_factory.ex b/test/support/factories/organizations_factory.ex index b2c93a760..7227e5405 100644 --- a/test/support/factories/organizations_factory.ex +++ b/test/support/factories/organizations_factory.ex @@ -19,7 +19,7 @@ defmodule Atomic.Factories.OrganizationFactory do def membership_factory do %Membership{ user: build(:user), - created_by: build(:user, role: "staff"), + created_by: build(:user, role: "admin"), organization: build(:organization), role: Enum.random(@roles) }