DEV: Update `Guardian#is_developer` to only require admin for Developer (#28396)
In development mode and when a developer's email is configured as part of `Rails.configuration.developer_emails`, the user can be trusted and should not be required to be an admin user.
This commit is contained in:
parent
31a6d24053
commit
e1c4cf2566
|
@ -155,9 +155,9 @@ class Guardian
|
|||
end
|
||||
|
||||
def is_developer?
|
||||
@user && is_admin? &&
|
||||
@user &&
|
||||
(
|
||||
Rails.env.development? || Developer.user_ids.include?(@user.id) ||
|
||||
Rails.env.development? || (is_admin? && Developer.user_ids.include?(@user.id)) ||
|
||||
(
|
||||
Rails.configuration.respond_to?(:developer_emails) &&
|
||||
Rails.configuration.developer_emails.include?(@user.email)
|
||||
|
|
Loading…
Reference in New Issue