On this page
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 (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
License: MIT License
Location: Cake/Console/Command/AclShell.php
Properties summary
-
Contains instance of AclComponent
$Acl
public -
$args
publicarray
-
$connection
publicstring
-
$tasks
publicarray
Method Summary
-
_dataVars() protectedBuild 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() protectedget params for standard Acl methods
-
_outputNode() protectedOutputs a single node, Either using the alias or Model.key
-
check() publicCheck permission for a given ARO to a given ACO.
-
create() publicCreates 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() publicDeny access for an ARO to an ACO.
-
getOptionParser() publicGets the option parser instance and configures it.
-
getPath() publicGet path to specified ARO/ACO node.
-
grant() publicGrant permission for a given ARO to a given ACO.
-
inherit() publicSet an ARO to inherit permission to an ACO.
-
initdb() publicInitialize ACL database.
-
main() publicOverride main() for help message hook
-
nodeExists() publicChecks 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() publicSet parent for an ARO/ACO node.
-
startup() publicOverride startup of the Shell
-
view() publicShow 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
arrayVariables
_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
integerInteger of NodeId. Will trigger an error if nothing is found.
_getParams()source protected
_getParams( )
get params for standard Acl methods
Returns
arrayaro, 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.
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.
getOptionParser()source public
getOptionParser( )
Gets the option parser instance and configures it.
Returns
ConsoleOptionParser
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
mixeda string for aliases, and an array for model.foreignKey
Properties detail
© 2005–2017 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.10/class-AclShell.html