✏️ 正在编辑: Acl.php
路径:
/srv/systems_dir/biblioteca_yuppie/library/Yuppie/Acl.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php class Yuppie_Acl extends Zend_Acl { /** * * @param array $configs */ public function __construct($configs) { foreach($configs as $role => $resources) { $this->addRole($role); foreach($resources as $resource => $privileges) { if (!$this->has($resource)) { $this->add(new Zend_Acl_Resource($resource)); } $allowPrivileges = array(); $denyPrivileges = array(); foreach($privileges as $privilege => $allow) { if ($privilege) { if ($allow) { $allowPrivileges[] = $privilege; } else { $denyPrivileges[] = $privilege; } } elseif ($allow) { $this->allow($role, $resource); } else { $this->deny($role, $resource); } } $this->allow($role, $resource, $allowPrivileges); $this->deny($role, $resource, $denyPrivileges); } } if ($this->has('acl_auth')) { $this->allow(null, 'acl_auth'); } } }
💾 保存文件
← 返回文件管理器