From 63387a79e3dce8e47e3fa428b85345cd88cbec5e Mon Sep 17 00:00:00 2001 From: gwoo Date: Sun, 10 Jun 2007 17:38:50 +0000 Subject: [PATCH] updating acl shell git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5271 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/console/libs/acl.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cake/console/libs/acl.php b/cake/console/libs/acl.php index c0a2f31fd..0f2b21fd2 100644 --- a/cake/console/libs/acl.php +++ b/cake/console/libs/acl.php @@ -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 []\n" . + 'grant' => "\tgrant [] 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');