Do not require permissions if authentication is not required

refs #9644
This commit is contained in:
Eric Lippmann 2015-07-23 12:50:02 +02:00
parent bf590ed380
commit b000ae3a37
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ class ActionController extends Zend_Controller_Action
*/
public function assertPermission($permission)
{
if (! $this->Auth()->hasPermission($permission)) {
if ($this->requiresAuthentication && ! $this->Auth()->hasPermission($permission)) {
throw new SecurityException('No permission for %s', $permission);
}
}