diff options
| author | Robert | 2017-07-05 16:52:44 +0200 |
|---|---|---|
| committer | Robert | 2017-07-06 08:37:18 +0200 |
| commit | b09994a4ee79f735f9b3f43535c6d138c4b68a56 (patch) | |
| tree | 92b244bc9d9d4d8e792d0129793ceb553738afd1 /app/policies/access_link_policy.rb | |
| parent | e53aa88c442bd0057c4e0ae66e2684d62d3193ed (diff) | |
| download | chouette-core-b09994a4ee79f735f9b3f43535c6d138c4b68a56.tar.bz2 | |
Refs:#3478@10h;
Policy Refactoring and Policy Test Completion
- All policies (and all permissions) under test.
- Common patterns and potential problems identified...
- ... and documented in DEVNOTES.md
- some simply refactorings
Diffstat (limited to 'app/policies/access_link_policy.rb')
| -rw-r--r-- | app/policies/access_link_policy.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/policies/access_link_policy.rb b/app/policies/access_link_policy.rb index a4f0e40e8..1f1147f60 100644 --- a/app/policies/access_link_policy.rb +++ b/app/policies/access_link_policy.rb @@ -6,11 +6,11 @@ class AccessLinkPolicy < ApplicationPolicy end def create? - !archived? && oragnisation_mathc? && user.has_permission?('access_links.create') + !archived? && organisation_match? && user.has_permission?('access_links.create') end def update? - !archived? && organisation_match? && user.has_permission?('access_links.edit') + !archived? && organisation_match? && user.has_permission?('access_links.update') end def destroy? |
