Do not require permissions if authentication is not required
refs #9644
This commit is contained in:
parent
bf590ed380
commit
b000ae3a37
|
@ -152,7 +152,7 @@ class ActionController extends Zend_Controller_Action
|
||||||
*/
|
*/
|
||||||
public function assertPermission($permission)
|
public function assertPermission($permission)
|
||||||
{
|
{
|
||||||
if (! $this->Auth()->hasPermission($permission)) {
|
if ($this->requiresAuthentication && ! $this->Auth()->hasPermission($permission)) {
|
||||||
throw new SecurityException('No permission for %s', $permission);
|
throw new SecurityException('No permission for %s', $permission);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue