Class AclShell

Shell for ACL management. This console is known to have issues with zend.ze1_compatibility_mode being enabled. Be sure to turn it off when using this shell.

AppShell
Extended by AclShell
Package: Cake\Console\Command
Copyright: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
License: MIT License
Location: Cake/Console/Command/AclShell.php

Properties summary

  • $Acl public
    Contains instance of AclComponent
  • $args public
    array
    Contains arguments parsed from the command line.
  • $connection public
    string
    Contains database source to use
  • $tasks public
    array
    Contains tasks to load and instantiate

Method Summary

  • _dataVars() protected
    Build data parameters based on node type
  • _getNodeId() protected

    Get the node for a given identifier. $identifier can either be a string alias or an array of properties to use in AcoNode::node()

  • _getParams() protected
    get params for standard Acl methods
  • _outputNode() protected
    Outputs a single node, Either using the alias or Model.key
  • check() public
    Check permission for a given ARO to a given ACO.
  • create() public
    Creates an ARO/ACO node
  • delete() public

    Delete an ARO/ACO node. Note there may be (as a result of poor configuration) multiple records with the same logical identifier. All are deleted.

  • deny() public
    Deny access for an ARO to an ACO.
  • Gets the option parser instance and configures it.
  • getPath() public
    Get path to specified ARO/ACO node.
  • grant() public
    Grant permission for a given ARO to a given ACO.
  • inherit() public
    Set an ARO to inherit permission to an ACO.
  • initdb() public
    Initialize ACL database.
  • main() public
    Override main() for help message hook
  • nodeExists() public
    Checks that given node exists
  • Parse an identifier into Model.foreignKey or an alias. Takes an identifier determines its type and returns the result as used by other methods.

  • setParent() public
    Set parent for an ARO/ACO node.
  • startup() public
    Override startup of the Shell
  • view() public
    Show a specific ARO/ACO node.

Method Detail

_dataVars()source protected

_dataVars( string $type null )

Build data parameters based on node type

Parameters

string $type optional null
Node type (ARO/ACO)

Returns

array
Variables

_getNodeId()source protected

_getNodeId( string $class , string|array|null $identifier )

Get the node for a given identifier. $identifier can either be a string alias or an array of properties to use in AcoNode::node()

Parameters

string $class
Class type you want (Aro/Aco)
string|array|null $identifier
A mixed identifier for finding the node, otherwise null.

Returns

integer
Integer of NodeId. Will trigger an error if nothing is found.

_getParams()source protected

_getParams( )

get params for standard Acl methods

Returns

array
aro, aco, action

_outputNode()source protected

_outputNode( string $class , array $node , integer $indent )

Outputs a single node, Either using the alias or Model.key

Parameters

string $class
Class name that is being used.
array $node
Array of node information.
integer $indent
indent level.

check()source public

check( )

Check permission for a given ARO to a given ACO.

create()source public

create( )

Creates an ARO/ACO node

delete()source public

delete( )

Delete an ARO/ACO node. Note there may be (as a result of poor configuration) multiple records with the same logical identifier. All are deleted.

deny()source public

deny( )

Deny access for an ARO to an ACO.

getOptionParser()source public

getOptionParser( )

Gets the option parser instance and configures it.

Returns

ConsoleOptionParser

getPath()source public

getPath( )

Get path to specified ARO/ACO node.

grant()source public

grant( )

Grant permission for a given ARO to a given ACO.

inherit()source public

inherit( )

Set an ARO to inherit permission to an ACO.

initdb()source public

initdb( )

Initialize ACL database.

Returns

mixed

main()source public

main( )

Override main() for help message hook

nodeExists()source public

nodeExists( )

Checks that given node exists

Returns

boolean
Success

parseIdentifier()source public

parseIdentifier( string $identifier )

Parse an identifier into Model.foreignKey or an alias. Takes an identifier determines its type and returns the result as used by other methods.

Parameters

string $identifier
Identifier to parse

Returns

mixed
a string for aliases, and an array for model.foreignKey

setParent()source public

setParent( )

Set parent for an ARO/ACO node.

startup()source public

startup( )

Override startup of the Shell

view()source public

view( )

Show a specific ARO/ACO node.

Properties detail

$Aclsource

public AclComponent

Contains instance of AclComponent

$argssource

public array

Contains arguments parsed from the command line.

$connectionsource

public string

Contains database source to use

'default'

$taskssource

public array

Contains tasks to load and instantiate

array('DbConfig')

© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.9/class-AclShell.html