Commit 1327bacf authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

getResource transformé en GetResourceId (plus cohérent)

parent 4ffee152
......@@ -253,6 +253,6 @@ class Privilege implements ResourceInterface
*/
public function getResourceId()
{
return Privileges::getResource($this);
return Privileges::getResourceId($this);
}
}
......@@ -20,7 +20,7 @@ class Privileges {
*
* @return string
*/
public static function getResource( $privilege )
public static function getResourceId( $privilege )
{
if ($privilege instanceof Privilege){
$privilege = $privilege->getFullCode();
......
......@@ -2,8 +2,8 @@
use UnicaenAuth\Provider\Privilege\Privileges;
$canViewRoles = $this->isAllowed(Privileges::getResource(Privileges::DROIT_ROLE_VISUALISATION));
$canViewPrivileges = $this->isAllowed(Privileges::getResource(Privileges::DROIT_PRIVILEGE_VISUALISATION));
$canViewRoles = $this->isAllowed(Privileges::getResourceId(Privileges::DROIT_ROLE_VISUALISATION));
$canViewPrivileges = $this->isAllowed(Privileges::getResourceId(Privileges::DROIT_PRIVILEGE_VISUALISATION));
?>
<h1 class="page-header">Gestion des droits d'accès</h1>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment