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
Properties summary
- Contains instance of AclComponent
-
array
Contains arguments parsed from the command line. -
string
Contains database source to use -
array
Contains tasks to load and instantiate
Method Summary
- Build data parameters based on node type
-
Get the node for a given identifier. $identifier can either be a string alias or an array of properties to use in AcoNode::node()
- get params for standard Acl methods
- Outputs a single node, Either using the alias or Model.key
- Check permission for a given ARO to a given ACO.
- Creates an ARO/ACO node
-
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 access for an ARO to an ACO.
- Gets the option parser instance and configures it.
- Get path to specified ARO/ACO node.
- Grant permission for a given ARO to a given ACO.
- Set an ARO to inherit permission to an ACO.
- Initialize ACL database.
- Override main() for help message hook
- 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.
- Set parent for an ARO/ACO node.
- Override startup of the Shell
- 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
public array
Contains arguments parsed from the command line.
public string
Contains database source to use
public array
Contains tasks to load and instantiate
© 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