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 ModelPermissionsBehavior

Base class for behaviors respecting the establishment of access permissions

CComponent
Extended by CBehavior implements IBehavior
Extended by CModelBehavior
Extended by CActiveRecordBehavior
Extended by ModelPermissionsBehavior

Direct known subclasses

X2PermissionsBehavior
Abstract
Package: application\components\permissions
Located at x2engine/protected/components/permissions/ModelPermissionsBehavior.php
Methods summary
abstract public CDbCriteria
# getAccessCriteria( )

Returns a CDbCriteria containing record-level access conditions.

Returns a CDbCriteria containing record-level access conditions.

Returns

CDbCriteria
abstract public integer
# getAccessLevel( mixed $uid = null )

Returns a number from 0 to 3 representing the current user's access level using the Yii auth manager Assumes authItem naming scheme like "ContactsViewPrivate", etc. This method probably ought to overridden, as there is no reliable way to determine the module a model "belongs" to.

Returns a number from 0 to 3 representing the current user's access level using the Yii auth manager Assumes authItem naming scheme like "ContactsViewPrivate", etc. This method probably ought to overridden, as there is no reliable way to determine the module a model "belongs" to.

Returns

integer
The access level. 0=no access, 1=own records, 2=public records, 3=full access
abstract public String
# getAccessConditions( integer $accessLevel )

Generates SQL condition to filter out records the user doesn't have
permission to see. This method is used by the 'accessControl' filter.

Generates SQL condition to filter out records the user doesn't have permission to see. This method is used by the 'accessControl' filter.

Parameters

$accessLevel
integer
$accessLevel The user's access level. 0=no access, 1=own records, 2=public records, 3=full access

Returns

String
The SQL conditions
abstract public
# getAssignmentAttr( )
abstract public
# getVisibilityAttr( )
public static
# getVisibilityOptions( )
public static
# getUserNameRegex( mixed $username = null )
Methods inherited from CActiveRecordBehavior
afterDelete(), afterFind(), afterSave(), beforeCount(), beforeDelete(), beforeFind(), beforeSave(), events()
Methods inherited from CModelBehavior
afterConstruct(), afterValidate(), beforeValidate()
Methods inherited from CBehavior
attach(), detach(), 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 summary
public boolean|string $assignmentAttr
#

The attribute to use for assignment and ownership. False signifies that it's to be treated as if owned by the system/no one in particular.

The attribute to use for assignment and ownership. False signifies that it's to be treated as if owned by the system/no one in particular.

public boolean|string $visibilityAttr
#

The attribute to use for visibility settings. False signifies that visibility should be ignored.

The attribute to use for visibility settings. False signifies that visibility should be ignored.

Magic properties inherited from CActiveRecordBehavior
$owner
Magic properties inherited from CBehavior
$enabled
X2CRM Documentation API documentation generated by ApiGen 2.8.0