Overview

Packages

  • application
    • commands
    • components
      • actions
      • filters
      • leftWidget
      • permissions
      • sortableWidget
      • util
      • webupdater
      • x2flow
        • actions
        • triggers
      • X2GridView
      • X2Settings
    • controllers
    • models
      • embedded
    • modules
      • accounts
        • controllers
        • models
      • actions
        • controllers
        • models
      • calendar
        • controllers
        • models
      • charts
        • models
      • contacts
        • controllers
        • models
      • docs
        • components
        • controllers
        • models
      • groups
        • controllers
        • models
      • marketing
        • components
        • controllers
        • models
      • media
        • controllers
        • models
      • mobile
        • components
      • opportunities
        • controllers
        • models
      • products
        • controllers
        • models
      • quotes
        • controllers
        • models
      • services
        • controllers
        • models
      • template
        • models
      • users
        • controllers
        • models
      • workflow
        • controllers
        • models
      • x2Leads
        • controllers
        • models
  • None
  • system
    • base
    • caching
    • console
    • db
      • ar
      • schema
    • validators
    • web
      • actions
      • auth
      • helpers
      • widgets
        • captcha
        • pagers
  • zii
    • widgets
      • grid

Classes

  • ControllerPermissionsBehavior
  • ModelPermissionsBehavior
  • X2ControllerPermissionsBehavior
  • X2PermissionsBehavior
  • Overview
  • Package
  • Class
  • Tree

Class ControllerPermissionsBehavior

Description of ControllerPermissionsBehavior

CComponent
Extended by CBehavior implements IBehavior
Extended by ControllerPermissionsBehavior

Direct known subclasses

X2ControllerPermissionsBehavior
Abstract
Package: application\components\permissions
Located at x2engine/protected/components/permissions/ControllerPermissionsBehavior.php
Methods summary
abstract public boolean
# beforeAction( string $action = null )

Extension of a base Yii function, this method is run before every action in a controller. If true is returned, it procedes as normal, otherwise it can redirect to the login page or generate a 403 error.

Extension of a base Yii function, this method is run before every action in a controller. If true is returned, it procedes as normal, otherwise it can redirect to the login page or generate a 403 error.

Parameters

$action
string
$action The name of the action being executed.

Returns

boolean
True if the user can procede with the requested action
abstract public boolean
# checkPermissions( mixed & $model, string $action = null )

Determines if we have permission to edit something based on the assignedTo field.

Determines if we have permission to edit something based on the assignedTo field.

Parameters

$model
mixed
$model The model in question (subclass of CActiveRecord or X2Model
$action
string
$action "view" "edit" or "delete" -- what we're trying to do

Returns

boolean
Whether or not the user is allowed for that action
abstract public array
# formatMenu( array $array, array $params = array() )

Format the left sidebar menu of links to remove items which a user is not allowed to perform due to role settings.

Format the left sidebar menu of links to remove items which a user is not allowed to perform due to role settings.

Parameters

$array
array
$array An array of menu items to be formatted
$params
array
$params An array of special parameters to be used for a role's biz rule

Returns

array
The formatted list of menu items
Methods inherited from CBehavior
attach(), detach(), events(), getEnabled(), getOwner(), setEnabled()
Methods inherited from CComponent
__call(), __get(), __isset(), __set(), __unset(), asa(), attachBehavior(), attachBehaviors(), attachEventHandler(), canGetProperty(), canSetProperty(), detachBehavior(), detachBehaviors(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), getEventHandlers(), hasEvent(), hasEventHandler(), hasProperty(), raiseEvent()
Magic properties inherited from CBehavior
$enabled, $owner
X2CRM Documentation API documentation generated by ApiGen 2.8.0