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

  • AccountsGridViewProfileWidget
  • ActionMenu
  • ActionsGridViewProfileWidget
  • ActionsQuickCreateRelationshipBehavior
  • ActiveDateRangeInput
  • ApplicationConfigBehavior
  • Attachments
  • ChatBox
  • CommonControllerBehavior
  • ContactMapInlineTags
  • ContactsGridViewProfileWidget
  • CronForm
  • CSaveRelationsBehavior
  • DateRangeInputsWidget
  • DocsGridViewProfileWidget
  • DocViewer
  • DocViewerProfileWidget
  • EButtonColumnWithClearFilters
  • EmailDeliveryBehavior
  • EmailProgressControl
  • EncryptedFieldsBehavior
  • EventsChartProfileWidget
  • FileUploader
  • FontPickerInput
  • Formatter
  • FormView
  • GridViewWidget
  • History
  • IframeWidget
  • ImportExportBehavior
  • InlineActionForm
  • InlineEmailAction
  • InlineEmailForm
  • InlineEmailModelBehavior
  • InlineQuotes
  • JSONEmbeddedModelFieldsBehavior
  • JSONFieldsDefaultValuesBehavior
  • LeadRoutingBehavior
  • LeftWidget
  • LoginThemeHelper
  • LoginThemeHelperBase
  • MarketingGridViewProfileWidget
  • MediaBox
  • MessageBox
  • MobileFormatter
  • MobileFormLayoutRenderer
  • MobileLayoutRenderer
  • MobileLoginThemeHelper
  • MobileViewLayoutRenderer
  • ModelFileUploader
  • NewWebLeadsGridViewProfileWidget
  • NormalizedJSONFieldsBehavior
  • NoteBox
  • OnlineUsers
  • OpportunitiesGridViewProfileWidget
  • Panel
  • ProfileDashboardManager
  • ProfileGridViewWidget
  • ProfileLayoutEditor
  • ProfilesGridViewProfileWidget
  • Publisher
  • PublisherActionTab
  • PublisherCalendarEventTab
  • PublisherCallTab
  • PublisherCommentTab
  • PublisherEventTab
  • PublisherSmallCalendarEventTab
  • PublisherTab
  • PublisherTimeTab
  • QuickContact
  • QuickCreateRelationshipBehavior
  • QuotesGridViewProfileWidget
  • RecordAliasesWidget
  • RecordViewLayoutManager
  • RecordViewWidgetManager
  • RememberPagination
  • Reminders
  • ResponseBehavior
  • ResponsiveHtml
  • SearchIndexBehavior
  • ServicesGridViewProfileWidget
  • SmallCalendar
  • SmartActiveDataProvider
  • SmartDataProviderBehavior
  • SmartSort
  • SocialForm
  • SortableWidgetManager
  • SortableWidgets
  • TagBehavior
  • TagCloud
  • TemplatesGridViewProfileWidget
  • TimeZone
  • TopContacts
  • TopSites
  • TransformedFieldStorageBehavior
  • TranslationLogger
  • TwitterFeed
  • TwoColumnSortableWidgetManager
  • UpdaterBehavior
  • UpdatesForm
  • UserIdentity
  • UsersChartProfileWidget
  • WorkflowBehavior
  • X2ActiveGridView
  • X2ActiveGridViewForSortableWidgets
  • X2AssetManager
  • X2AuthManager
  • X2ChangeLogBehavior
  • X2ClientScript
  • X2Color
  • X2DateUtil
  • X2FixtureManager
  • X2FlowFormatter
  • X2GridView
  • X2GridViewBase
  • X2GridViewForSortableWidgets
  • X2GridViewSortableWidgetsBehavior
  • X2LeadsGridViewProfileWidget
  • X2LinkableBehavior
  • X2ListView
  • X2PillBox
  • X2ProgressBar
  • X2SmartSearchModelBehavior
  • X2TimestampBehavior
  • X2TranslationBehavior
  • X2UrlRule
  • X2WebModule
  • X2Widget
  • X2WidgetList
  • Overview
  • Package
  • Class
  • Tree

Class X2AuthManager

RBAC auth manager for X2Engine

CComponent
Extended by CApplicationComponent implements IApplicationComponent
Extended by CAuthManager implements IAuthManager
Extended by CDbAuthManager
Extended by X2AuthManager
Package: application\components
Author: Demitri Morgan <demitri@x2engine.com>
Located at x2engine/protected/components/X2AuthManager.php
Methods summary
public boolean
# checkAccess( string $itemName, integer $userId, array $params = array() )

Access check function.

Access check function.

Checks access and attempts to speed up all future access checks using caching and storage of the variable within _access.

Note, only if parameters are empty will permissions caching or storage in _access be effective, because parameters (i.e. the assignment of a record based on the value of its assignedTo field) are expected to vary. For example, in record-specific permission items checked for multiple records. That is why $params be empty for any shortcuts to be taken.

Parameters

$itemName
string
$itemName Name of the auth item for which access is being checked
$userId
integer
$userId ID of the user for which to check access
$params
array
$params Parameters to pass to business rules

Returns

boolean

Overrides

CDbAuthManager::checkAccess()
protected
# getCacheParams( array $params )
public
# checkAdminOn( array $params )

Checks for admin access on a specific named module.

Checks for admin access on a specific named module.

Originally written as a kludge to bypass checking for overall admin access when performing a generic admin action that is specific to a module. Specifically, it was written for exporting models as a fix for 4.1.6, wherein otherwise a user would need full admin rights and not just contact module admin rights to export contacts.

Note, since this starts its own chain of recursive access checking, extreme caution should be used when using this method inside of a business rule, because infinite loops could potentially occur.

Parameters

$params
array
$params An associative array that is presumed to contain a "userId" element that refers to the user ID (as if $params is as within a business rule), and also expects a model (or module) parameter.
public boolean
# checkAssignment( array $params )

Assignment check function for business rules. Note that this method does not check for assignment to "Anyone". At the time of this writing, checkAssignment is used exclusively for checking permissions related to private access.

Assignment check function for business rules. Note that this method does not check for assignment to "Anyone". At the time of this writing, checkAssignment is used exclusively for checking permissions related to private access.

Parameters

$params
array
$params

Returns

boolean
public boolean
# checkVisibility( array $params )

Visibility check function for business rules

Visibility check function for business rules

Parameters

$params
array
$params

Returns

boolean
Methods inherited from CDbAuthManager
addItemChild(), assign(), checkAccessRecursive(), clearAll(), clearAuthAssignments(), createAuthItem(), detectLoop(), getAuthAssignment(), getAuthAssignments(), getAuthItem(), getAuthItems(), getDbConnection(), getItemChildren(), hasItemChild(), init(), isAssigned(), removeAuthItem(), removeItemChild(), revoke(), save(), saveAuthAssignment(), saveAuthItem(), usingSqlite()
Methods inherited from CAuthManager
checkItemChildType(), createOperation(), createRole(), createTask(), executeBizRule(), getOperations(), getRoles(), getTasks()
Methods inherited from CApplicationComponent
getIsInitialized()
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()
Properties summary
public boolean $caching true
#
protected array $_usernames array()
#
Properties inherited from CDbAuthManager
$assignmentTable, $connectionID, $db, $itemChildTable, $itemTable
Properties inherited from CAuthManager
$defaultRoles, $showErrors
Properties inherited from CApplicationComponent
$behaviors
Magic properties inherited from CDbAuthManager
$authItems
Magic properties inherited from CAuthManager
$operations, $roles, $tasks
Magic properties inherited from CApplicationComponent
$isInitialized
X2CRM Documentation API documentation generated by ApiGen 2.8.0