Class: Archangel::SitePolicy

Inherits:
ApplicationPolicy show all
Defined in:
app/policies/archangel/site_policy.rb

Overview

Site policy

Instance Attribute Summary

Attributes inherited from ApplicationPolicy

#record, #user

Instance Method Summary collapse

Methods inherited from ApplicationPolicy

#create?, #destroy?, #edit?, #index?, #initialize, #new?, #scope, #show?

Constructor Details

This class inherits a constructor from Archangel::ApplicationPolicy

Instance Method Details

#update?Boolean

Check if `#update` action is authorized for current user. Based on if current user has the “admin” role

Returns:

  • (Boolean)

    true when User is an “admin” role


14
15
16
# File 'app/policies/archangel/site_policy.rb', line 14

def update?
  admin_user?
end