Skip to content

Commit

Permalink
Fix auth
Browse files Browse the repository at this point in the history
  • Loading branch information
johnf committed Nov 6, 2023
1 parent b4a5fb9 commit 6ebbe4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/graphql/types/email_user_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class EmailUserType < Types::BaseObject
field :last_name, String, null: true

def self.authorized?(object, context)
super && context[:viewer].admin?
super && context[:current_user] && context[:current_user].admin?
end
end
end

0 comments on commit 6ebbe4d

Please sign in to comment.