diff options
| author | Robert | 2017-05-24 11:13:37 +0200 |
|---|---|---|
| committer | Robert | 2017-05-29 17:34:42 +0200 |
| commit | d67ad14d0fe9fbfe08a450317d208afcee48d819 (patch) | |
| tree | 1a5fa3056e0866caa2c4a150a08f0775477b48fe /app | |
| parent | 54bf18da9a74295c327e39c659ef3a28719a2631 (diff) | |
| download | chouette-core-d67ad14d0fe9fbfe08a450317d208afcee48d819.tar.bz2 | |
Refs: #3385; basic policy for boiv:*
Diffstat (limited to 'app')
| -rw-r--r-- | app/policies/boiv_policy.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/policies/boiv_policy.rb b/app/policies/boiv_policy.rb index 4270dc686..9679d083a 100644 --- a/app/policies/boiv_policy.rb +++ b/app/policies/boiv_policy.rb @@ -5,6 +5,10 @@ class BoivPolicy < ApplicationPolicy organisation_match? && user.has_permission?('boiv:read-offer') end + def boiv? + !(user.permissions || []).grep(%r{\Aboiv:.}).empty? + end + def index? boiv_read_offer? end |
