implement user creation by admin
This commit is contained in:
parent
f057900fb1
commit
93404d543f
5 changed files with 93 additions and 21 deletions
|
|
@ -119,6 +119,9 @@ class Ability
|
|||
# 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 :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