blob: 7ba5102a40623e0d88b2f92428f55ed9907b03f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
# frozen_string_literal: true
class WorkItemPolicy < BasePolicy
delegate { @subject.project }
desc 'User is author of the work item'
condition(:author) do
@user && @user == @subject.author
end
rule { can?(:owner_access) | author }.enable :delete_work_item
end
|