mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Ability of user to create registration is fixed Closes #1628
Speaker's ability to create registration and corresponding tests are improved
This commit is contained in:
parent
63515cef58
commit
7326bd132f
2 changed files with 130 additions and 4 deletions
|
|
@ -66,7 +66,13 @@ class Ability
|
|||
|
||||
can [:new, :create], Registration do |registration|
|
||||
conference = registration.conference
|
||||
conference.registration_open? && !conference.registration_limit_exceeded? || conference.program.speakers.confirmed.include?(user)
|
||||
if conference.user_registered? user
|
||||
false
|
||||
elsif conference.program.speakers.confirmed.include?(user) && conference.registration_period
|
||||
true
|
||||
else
|
||||
conference.registration_open? && !conference.registration_limit_exceeded?
|
||||
end
|
||||
end
|
||||
|
||||
can :index, Organization
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue