diff options
| author | Robert | 2017-09-14 23:57:15 +0200 | 
|---|---|---|
| committer | Robert | 2017-09-14 23:57:15 +0200 | 
| commit | 402ba92a128e697fe6da754ee3454c315afebacb (patch) | |
| tree | eb1ed05a4679761257ebf7c791edb36698f9a089 /app/policies/api_key_policy.rb | |
| parent | 9c9667baba6cc265b4756eb40ac35cdac3b7439d (diff) | |
| download | chouette-core-402ba92a128e697fe6da754ee3454c315afebacb.tar.bz2 | |
Refs: #4446@1h; Api Keys Edit feature speced
Diffstat (limited to 'app/policies/api_key_policy.rb')
| -rw-r--r-- | app/policies/api_key_policy.rb | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/app/policies/api_key_policy.rb b/app/policies/api_key_policy.rb index bc5c9e433..eb7b84457 100644 --- a/app/policies/api_key_policy.rb +++ b/app/policies/api_key_policy.rb @@ -14,6 +14,7 @@ class ApiKeyPolicy < ApplicationPolicy    end    def update? -    organisation_match? && user.has_permission?('api_keys.update') +    record.try(:organisation_id) == user.organisation_id && +      user.has_permission?('api_keys.update')    end  end | 
