Skip to content

Commit

Permalink
Resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioRodrigues10 committed Jul 21, 2023
2 parents eec29b2 + 9d8e9ef commit 7ce4cf3
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 49 deletions.
2 changes: 1 addition & 1 deletion lib/atomic/accounts/user.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/atomic_web/controllers/user_registration_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
45 changes: 0 additions & 45 deletions priv/repo/seeds/accounts.exs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/support/factories/accounts_factory.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion test/support/factories/organizations_factory.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 7ce4cf3

Please sign in to comment.