diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/agency.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/agency.rb b/app/models/agency.rb index fe81687..03e6e5a 100644 --- a/app/models/agency.rb +++ b/app/models/agency.rb @@ -19,4 +19,14 @@ class Agency < ApplicationRecord r&.public_send("#{role}=", false) && r&.save end end + + # Grant role to current user in current agent + def grant(role) + self.class.grant(agent, user, role) + end + + # Revoke role from current user in current agent + def revoke(role) + self.class.revoke(agent, user, role) + end end |