diff options
| author | Zog | 2018-03-07 11:35:25 +0100 |
|---|---|---|
| committer | Zog | 2018-03-12 12:00:14 +0100 |
| commit | 1245099459bd3d7dce71fdf0d7c95b2377a0034e (patch) | |
| tree | c17f2c4bd68fc6ad4eedead96e1106954d7093e4 /app/policies/export_policy.rb | |
| parent | 0b9269780989dbd69a9be9d63670aab12050cf60 (diff) | |
| download | chouette-core-1245099459bd3d7dce71fdf0d7c95b2377a0034e.tar.bz2 | |
Refs #6133; First Crud for exports
Diffstat (limited to 'app/policies/export_policy.rb')
| -rw-r--r-- | app/policies/export_policy.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/policies/export_policy.rb b/app/policies/export_policy.rb new file mode 100644 index 000000000..e667f3207 --- /dev/null +++ b/app/policies/export_policy.rb @@ -0,0 +1,15 @@ +class ExportPolicy < ApplicationPolicy + class Scope < Scope + def resolve + scope + end + end + + def create? + user.has_permission?('exports.create') + end + + def update? + user.has_permission?('exports.update') + end +end |
