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
- AclShell
Copyright: Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Location: Cake/Console/Command/AclShell.php
Properties summary
-
$Acl
publicContains instance of AclComponent -
$args
publicarray
Contains arguments parsed from the command line. -
$connection
publicstring
Contains database source to use -
$tasks
publicarray
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. -
deny() public
Deny access for an ARO to an ACO. -
getOptionParser() public
Get the option parser. -
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 -
parseIdentifier() public
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() protected ¶
_dataVars( string $type = null )
Build data parameters based on node type
Parameters
- string $type optional null
- Node type (ARO/ACO)
Returns
Variables
_getNodeId() protected ¶
_getNodeId( string $class , mixed $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)
- mixed $identifier
- A mixed identifier for finding the node.
Returns
Integer of NodeId. Will trigger an error if nothing is found.
_getParams() protected ¶
_getParams( )
get params for standard Acl methods
Returns
aro, aco, action
_outputNode() 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.
parseIdentifier() 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
a string for aliases, and an array for model.foreignKey