diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-09-20 21:50:11 +0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-19 19:58:24 +0300 |
commit | 32c663ff248f6ad2f2fa10fd2e81d6535fb88fd6 (patch) | |
tree | dfa2dbe7044f47b1d3f80979e12364f25308c7ef /app/policies/group_label_policy.rb | |
parent | 701544fb48a5add0cc7cbba729e6438d7a040385 (diff) |
Use policies to handle with global/project label permissions
Diffstat (limited to 'app/policies/group_label_policy.rb')
-rw-r--r-- | app/policies/group_label_policy.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/policies/group_label_policy.rb b/app/policies/group_label_policy.rb new file mode 100644 index 00000000000..4d4052c5800 --- /dev/null +++ b/app/policies/group_label_policy.rb @@ -0,0 +1,5 @@ +class GroupLabelPolicy < BasePolicy + def rules + can! :admin_label if Ability.allowed?(@user, :admin_label, @subject.group) + end +end |