Method: Webhookdb::Role.admin_role
- Defined in:
- lib/webhookdb/role.rb
.admin_role ⇒ Object
n.b. Because of the uniqueness constraint on “name”, there is only one “admin” role. Its meaning depends on the context: if the customer has this role, they are an admin; if the org membership has this role, the customer is an org admin.
11 12 13 14 15 |
# File 'lib/webhookdb/role.rb', line 11 def self.admin_role return Webhookdb.cached_get("role_admin") do self.find_or_create_or_find(name: "admin") end end |