Skip to content

Commit

Permalink
Merge pull request #1 from mapbender/fix/ldap-groups-usage
Browse files Browse the repository at this point in the history
Fix usage with mapbender groups
  • Loading branch information
PhilVanB authored Dec 4, 2020
2 parents 384b4ba + d5d5020 commit 52e0f24
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Security/Provider/LDAPUserProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function loadUserByUsername($username)
foreach($ldapGroups as $group){
if (!empty($group['cn'][0])) {

$groups[] = 'ROLE_' . strtoupper($group['cn'][0]);
$groups[] = 'ROLE_GROUP_' . strtoupper($group['cn'][0]);
}

}
Expand Down
6 changes: 3 additions & 3 deletions Security/User/LDAPGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

namespace Mapbender\LDAPBundle\Security\User;

use Mapbender\LDAPBundle\Security\User\MapbenderGroupInterface;
use FOM\UserBundle\Entity\Group as Group;

class LDAPGroup implements MapbenderGroupInterface {
class LDAPGroup extends Group {

protected $title;

Expand All @@ -26,6 +26,6 @@ public function getTitle()

public function getAsRole()
{
return 'ROLE_' . strtoupper($this->getTitle());
return 'ROLE_GROUP_' . strtoupper($this->getTitle());
}
}

0 comments on commit 52e0f24

Please sign in to comment.