Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app/graphql/types/mfa_status_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ class MfaStatusType < Types::BaseObject
description 'Represents the MFA status of a user'

authorize :read_mfa_status
declarative_policy_subject { |obj| obj[:user] }

field :enabled, Boolean, null: false,
description: 'Indicates whether MFA is enabled for the user.'
Expand Down
1 change: 1 addition & 0 deletions app/graphql/types/user_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def mfa_status
enabled: object.mfa_enabled?,
totp_enabled: object.totp_secret.present?,
backup_codes_count: object.backup_codes.size,
user: object,
}
end
end
Expand Down