Skip to content

Commit 7e6ef7a

Browse files
committed
Make email verified at also only accessible by self or admin
1 parent 794a615 commit 7e6ef7a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/graphql/types/user_type.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ class UserType < Types::BaseObject
1010

1111
field :admin, Boolean, null: false, description: 'Global admin status of the user'
1212
field :email, String, null: false, description: 'Email of the user', authorize: :read_email
13-
field :email_verified_at, Types::TimeType, null: true, description: 'Email verification date of the user if present'
13+
field :email_verified_at, Types::TimeType, null: true,
14+
description: 'Email verification date of the user if present',
15+
authorize: :read_email
1416
field :firstname, String, null: true, description: 'Firstname of the user'
1517
field :lastname, String, null: true, description: 'Lastname of the user'
1618
field :username, String, null: false, description: 'Username of the user'

0 commit comments

Comments
 (0)