Class: Dscf::Core::AccountManagementPolicy

Inherits:
ApplicationPolicy show all
Defined in:
app/policies/dscf/core/account_management_policy.rb

Instance Attribute Summary

Attributes inherited from ApplicationPolicy

#record, #user

Instance Method Summary collapse

Methods inherited from ApplicationPolicy

#create?, #destroy?, #initialize, #show?, #update?

Constructor Details

This class inherits a constructor from Dscf::Core::ApplicationPolicy

Instance Method Details

#activate?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'app/policies/dscf/core/account_management_policy.rb', line 12

def activate?
  user.has_permission?("account_management.activate")
end

#index?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'app/policies/dscf/core/account_management_policy.rb', line 4

def index?
  user.has_permission?("account_management.index")
end

#suspend?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'app/policies/dscf/core/account_management_policy.rb', line 8

def suspend?
  user.has_permission?("account_management.suspend")
end