Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
auth
Commits
1327bacf
Commit
1327bacf
authored
Dec 02, 2015
by
Laurent Lécluse
Browse files
getResource transformé en GetResourceId (plus cohérent)
parent
4ffee152
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/UnicaenAuth/Entity/Db/Privilege.php
View file @
1327bacf
...
...
@@ -253,6 +253,6 @@ class Privilege implements ResourceInterface
*/
public
function
getResourceId
()
{
return
Privileges
::
getResource
(
$this
);
return
Privileges
::
getResource
Id
(
$this
);
}
}
src/UnicaenAuth/Provider/Privilege/Privileges.php
View file @
1327bacf
...
...
@@ -20,7 +20,7 @@ class Privileges {
*
* @return string
*/
public
static
function
getResource
(
$privilege
)
public
static
function
getResource
Id
(
$privilege
)
{
if
(
$privilege
instanceof
Privilege
){
$privilege
=
$privilege
->
getFullCode
();
...
...
view/unicaen-auth/droits/index.phtml
View file @
1327bacf
...
...
@@ -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
::
getResource
Id
(
Privileges
::
DROIT_ROLE_VISUALISATION
));
$canViewPrivileges
=
$this
->
isAllowed
(
Privileges
::
getResource
Id
(
Privileges
::
DROIT_PRIVILEGE_VISUALISATION
));
?>
<h1
class=
"page-header"
>
Gestion des droits d'accès
</h1>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment