Disable registration/event submission without sign in with ichain
This commit is contained in:
parent
4ed8a72967
commit
132fe6f98c
3 changed files with 18 additions and 7 deletions
|
|
@ -49,12 +49,13 @@ class Ability
|
|||
# can view Commercials of confirmed Events
|
||||
can :show, Commercial, commercialable_type: 'Event', commercialable_id: Event.where(state: 'confirmed').pluck(:id)
|
||||
can :show, User
|
||||
can [:show, :create], Registration do |registration|
|
||||
registration.new_record?
|
||||
end
|
||||
|
||||
can [:show, :create], Event do |event|
|
||||
event.new_record?
|
||||
unless CONFIG['authentication']['ichain']['enabled']
|
||||
can [:show, :create], Registration do |registration|
|
||||
registration.new_record?
|
||||
end
|
||||
can [:show, :create], Event do |event|
|
||||
event.new_record?
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue