mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
updating acl shell
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5271 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
85a662d9ba
commit
63387a79e3
1 changed files with 4 additions and 4 deletions
|
@ -219,8 +219,9 @@ class AclShell extends Shell {
|
|||
//add existence checks for nodes involved
|
||||
$aro = (is_numeric($this->args[0])) ? intval($this->args[0]) : $this->args[0];
|
||||
$aco = (is_numeric($this->args[1])) ? intval($this->args[1]) : $this->args[1];
|
||||
$this->Acl->allow($aro, $aco, $this->args[2]);
|
||||
$this->out("Permission granted.\n");
|
||||
if($this->Acl->allow($aro, $aco, $this->args[2])) {
|
||||
$this->out("Permission granted.\n");
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Enter description here...
|
||||
|
@ -369,7 +370,7 @@ class AclShell extends Shell {
|
|||
"\t\tis useful in determining the inhertiance of permissions for a certain\n" .
|
||||
"\t\tobject in the tree.\n",
|
||||
|
||||
'grant' => "\tgrant <aro_id> <aco_id> [<aco_action>]\n" .
|
||||
'grant' => "\tgrant <aro_id> <aco_id> [<aco_action>] or '*' (quotes required)\n" .
|
||||
"\t\tUse this command to grant ACL permissions. Once executed, the ARO\n" .
|
||||
"\t\tspecified (and its children, if any) will have ALLOW access to the\n" .
|
||||
"\t\tspecified ACO action (and the ACO's children, if any).\n",
|
||||
|
@ -443,7 +444,6 @@ class AclShell extends Shell {
|
|||
if ($type == null) {
|
||||
$type = $this->args[0];
|
||||
}
|
||||
|
||||
$vars = array();
|
||||
$class = ucwords($type);
|
||||
$vars['secondary_id'] = ($class == 'aro' ? 'foreign_key' : 'object_id');
|
||||
|
|
Loading…
Reference in a new issue