Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auth
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lib
unicaen
auth
Commits
3548a071
Commit
3548a071
authored
Sep 13, 2013
by
Bertrand Gauthier
Browse files
Options
Downloads
Patches
Plain Diff
Renommages pour clarté.
parent
1e6aaa2f
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/UnicaenAuth/Provider/Identity/LdapPeople.php
+10
-10
10 additions, 10 deletions
src/UnicaenAuth/Provider/Identity/LdapPeople.php
with
10 additions
and
10 deletions
src/UnicaenAuth/Provider/Identity/LdapPeople.php
+
10
−
10
View file @
3548a071
...
...
@@ -32,7 +32,7 @@ class LdapPeople implements ProviderInterface, ServiceLocatorAwareInterface
/**
* @var AuthenticationService
*/
protected
$authService
;
protected
$auth
entication
Service
;
/**
* @var string|RoleInterface
...
...
@@ -40,11 +40,11 @@ class LdapPeople implements ProviderInterface, ServiceLocatorAwareInterface
protected
$defaultRole
;
/**
* @param AuthenticationService $authService
* @param AuthenticationService $auth
entication
Service
*/
public
function
__construct
(
AuthenticationService
$authService
)
public
function
__construct
(
AuthenticationService
$auth
entication
Service
)
{
$this
->
authService
=
$authService
;
$this
->
auth
entication
Service
=
$auth
entication
Service
;
}
/**
...
...
@@ -56,16 +56,16 @@ class LdapPeople implements ProviderInterface, ServiceLocatorAwareInterface
{
$roles
=
array
();
$identity
=
$this
->
authService
->
getIdentity
();
$identity
=
$this
->
auth
entication
Service
->
getIdentity
();
if
(
$identity
instanceof
LdapPeopleEntity
)
{
/* @var $identity LdapPeopleEntity */
$a
uthorize
Service
=
$this
->
getServiceLocator
()
->
get
(
'BjyAuthorize\Service\Authorize'
);
/* @var $a
uthorize
Service \BjyAuthorize\Service\Authorize */
$a
cl
Service
=
$this
->
getServiceLocator
()
->
get
(
'BjyAuthorize\Service\Authorize'
);
/* @var $a
cl
Service \BjyAuthorize\Service\Authorize */
foreach
(
$identity
->
getMemberOf
()
as
$group
)
{
// vérifie si le groupe LDAP est un rôle connu des ACL
try
{
$role
=
$a
uthorize
Service
->
getAcl
()
->
getRole
(
$group
);
$role
=
$a
cl
Service
->
getAcl
()
->
getRole
(
$group
);
}
catch
(
InvalidArgumentException
$exc
)
{
continue
;
...
...
@@ -106,7 +106,7 @@ class LdapPeople implements ProviderInterface, ServiceLocatorAwareInterface
public
function
setDefaultRole
(
$defaultRole
)
{
if
(
!
(
$defaultRole
instanceof
RoleInterface
||
is_string
(
$defaultRole
)))
{
throw
new
Exception
(
"Rôle pr défaut fourni invalide."
,
null
,
InvalidRoleException
::
invalidRoleInstance
(
$defaultRole
));
throw
new
Exception
(
"Rôle p
a
r défaut fourni invalide."
,
null
,
InvalidRoleException
::
invalidRoleInstance
(
$defaultRole
));
}
$this
->
defaultRole
=
$defaultRole
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment