Make use of ENV.fetch
This commit is contained in:
parent
200d188af2
commit
36b23ce25d
27 changed files with 51 additions and 53 deletions
|
|
@ -51,7 +51,7 @@ class AdminAbility
|
|||
# for admins
|
||||
can :manage, :all if user.is_admin
|
||||
# even admin cannot create new users with ICHAIN enabled
|
||||
cannot [:new, :create], User if ENV['OSEM_ICHAIN_ENABLED'] == 'true'
|
||||
cannot [:new, :create], User if ENV.fetch('OSEM_ICHAIN_ENABLED', nil) == 'true'
|
||||
cannot :revert_object, PaperTrail::Version do |version|
|
||||
(version.event == 'create' && %w[Conference User Event].include?(version.item_type))
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue