blob: a5b10bcb2c71bbccf6299f9375d853d2b281e8db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
<?php
namespace Application\Controller\Plugin;
use Zend\Mvc\Controller\Plugin\AbstractPlugin;
class CommandACLPlugin extends AbstractPlugin
{
private $commands = null;
private $required = null;
public function validate($commands=null, $required=null)
{
$this->commands = $commands;
$this->required = $required;
foreach($this->required as $cmd) {
if($this->commands[$cmd]['permission'] == 0) {
return false;
}
}
return true;
}
}
|