Removed delete action from abiltiy.rb and other places
There was no delete action defined for proposals, but it was there in ability.rb So the ability was deleted. Fixes #1608
This commit is contained in:
parent
b717018b31
commit
b4be83e3a6
3 changed files with 2 additions and 3 deletions
|
|
@ -87,7 +87,7 @@ class Ability
|
||||||
event.program.cfp_open? && event.new_record?
|
event.program.cfp_open? && event.new_record?
|
||||||
end
|
end
|
||||||
|
|
||||||
can [:update, :show, :delete, :index], Event do |event|
|
can [:update, :show, :index], Event do |event|
|
||||||
event.users.include?(user)
|
event.users.include?(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ class AdminAbility
|
||||||
event.program.cfp_open? && event.new_record?
|
event.program.cfp_open? && event.new_record?
|
||||||
end
|
end
|
||||||
|
|
||||||
can [:update, :show, :delete, :index], Event do |event|
|
can [:update, :show, :index], Event do |event|
|
||||||
event.users.include?(user)
|
event.users.include?(user)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,6 @@ describe 'User' do
|
||||||
|
|
||||||
it{ should be_able_to(:update, user_event_with_cfp) }
|
it{ should be_able_to(:update, user_event_with_cfp) }
|
||||||
it{ should be_able_to(:show, user_event_with_cfp) }
|
it{ should be_able_to(:show, user_event_with_cfp) }
|
||||||
it{ should be_able_to(:delete, user_event_with_cfp) }
|
|
||||||
it{ should_not be_able_to(:new, Event.new(program: program_without_cfp)) }
|
it{ should_not be_able_to(:new, Event.new(program: program_without_cfp)) }
|
||||||
it{ should_not be_able_to(:create, Event.new(program: program_without_cfp)) }
|
it{ should_not be_able_to(:create, Event.new(program: program_without_cfp)) }
|
||||||
# TODO: At moment it's not possible to manually add someone else as event_user
|
# TODO: At moment it's not possible to manually add someone else as event_user
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue