CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (GitHub)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • Slack
    • Paid Support
CakePHP

C CakePHP 2.2 API

  • Overview
  • Tree
  • Deprecated
  • Version:
    • 2.2
      • 4.2
      • 4.1
      • 4.0
      • 3.9
      • 3.8
      • 3.7
      • 3.6
      • 3.5
      • 3.4
      • 3.3
      • 3.2
      • 3.1
      • 3.0
      • 2.10
      • 2.9
      • 2.8
      • 2.7
      • 2.6
      • 2.5
      • 2.4
      • 2.3
      • 2.2
      • 2.1
      • 2.0
      • 1.3
      • 1.2

Packages

  • Cake
    • Cache
      • Engine
    • Configure
    • Console
      • Command
        • Task
    • Controller
      • Component
        • Acl
        • Auth
    • Core
    • Error
    • Event
    • I18n
    • Log
      • Engine
    • Model
      • Behavior
      • Datasource
        • Database
        • Session
      • Validator
    • Network
      • Email
      • Http
    • Routing
      • Filter
      • Route
    • TestSuite
      • Coverage
      • Fixture
      • Reporter
    • Utility
    • View
      • Helper

Classes

  • AclNode
  • Aco
  • AcoAction
  • Aro
  • BehaviorCollection
  • CakeSchema
  • ConnectionManager
  • I18nModel
  • Model
  • ModelBehavior
  • ModelValidator
  • Permission

Class Permission

Permissions linking AROs with ACOs

AppModel
Extended by Permission
Package: Cake\Model
Copyright: Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Location: Cake/Model/Permission.php

Properties summary

  • $actsAs public
    array
    No behaviors for this model
  • $belongsTo public
    array
    Permissions link AROs with ACOs
  • $cacheQueries public
    boolean
    Explicitly disable in-memory query caching
  • $name public
    string
    Model name
  • $useTable public
    string
    Override default table name

Method Summary

  • __construct() public

    Constructor, used to tell this model to use the database configured for ACL

  • allow() public
    Allow $aro to have access to action $actions in $aco
  • check() public
    Checks if the given $aro has access to action $action in $aco
  • getAclLink() public
    Get an array of access-control links between the given Aro and Aco
  • getAcoKeys() public
    Get the crud type keys

Method Detail

__construct() public ¶

__construct( )

Constructor, used to tell this model to use the database configured for ACL

allow() public ¶

allow( string $aro , string $aco , string $actions = "*" , integer $value = 1 )

Allow $aro to have access to action $actions in $aco

Parameters
string $aro
ARO The requesting object identifier.
string $aco
ACO The controlled object identifier.
string $actions optional "*"
Action (defaults to *)
integer $value optional 1
Value to indicate access type (1 to give access, -1 to deny, 0 to inherit)
Returns
boolean
Success

check() public ¶

check( string $aro , string $aco , string $action = "*" )

Checks if the given $aro has access to action $action in $aco

Parameters
string $aro
ARO The requesting object identifier.
string $aco
ACO The controlled object identifier.
string $action optional "*"
Action (defaults to *)
Returns
boolean
Success (true if ARO has access to action in ACO, false otherwise)

getAclLink() public ¶

getAclLink( string $aro , string $aco )

Get an array of access-control links between the given Aro and Aco

Parameters
string $aro
ARO The requesting object identifier.
string $aco
ACO The controlled object identifier.
Returns
array
Indexed array with: 'aro', 'aco' and 'link'

getAcoKeys() public ¶

getAcoKeys( array $keys )

Get the crud type keys

Parameters
array $keys
Permission schema
Returns
array
permission keys

Properties detail

$actsAs ¶

public array

No behaviors for this model

null

$belongsTo ¶

public array

Permissions link AROs with ACOs

array('Aro', 'Aco')

$cacheQueries ¶

public boolean

Explicitly disable in-memory query caching

false

$name ¶

public string

Model name

'Permission'

$useTable ¶

public string

Override default table name

'aros_acos'
OpenHub
Rackspace
Rackspace
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (GitHub)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • Slack
  • Paid Support

Generated using CakePHP API Docs