Skip to content

Commit e14b35a

Browse files
authored
Merge pull request #215 from heiglandreas/fixCAcl
Fix issues with ACL
2 parents 5f6b0b9 + 09fafbd commit e14b35a

File tree

4 files changed

+35
-38
lines changed

4 files changed

+35
-38
lines changed

composer.lock

Lines changed: 30 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/module/Phpug/config/module.config.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@
3131
*/
3232
namespace Phpug;
3333

34+
use Phpug\Form\UsergroupFieldset;
3435
use Phpug\Service\SlackInviteFormFactory;
36+
use Phpug\Service\UsergroupFieldsetFactory;
3537

3638
return array(
3739
'router' => array(
@@ -480,6 +482,7 @@
480482
'roleManager' => 'Phpug\Service\RoleManagerFactory',
481483
'PromoteUsergroupForm' => 'Phpug\Service\PromoteUsergroupFormFactory',
482484
'UsergroupFieldset' => 'Phpug\Service\UsergroupFieldsetFactory',
485+
UsergroupFieldset::class => UsergroupFieldsetFactory::class,
483486
'SlackInviteForm' => \Phpug\Service\SlackInviteFormFactory::class,
484487
'Phpug\Service\UsergroupMessage' => 'Phpug\Service\UsergroupMessageFactory',
485488
'Phpug\Service\Transport' => 'Phpug\Service\TransportFactory',

src/module/Phpug/src/Phpug/Acl/RoleManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function getRole()
149149
return $this->loggedInRole;
150150
}
151151

152-
if (! in_array($this->user->getDisplayName(), $this->admins[$this->user->getService()])) {
152+
if (! in_array($this->user->getName(), $this->admins[$this->user->getService()])) {
153153
return $this->loggedInRole;
154154
}
155155

src/module/Phpug/src/Phpug/Acl/UsersGroupAssertion.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public function assert(Acl $acl, RoleInterface $role = null, ResourceInterface $
102102
return false;
103103
}
104104
$service = strtolower($this->user->getService());
105-
$uid = strtolower($this->user->getDisplayName());
105+
$uid = strtolower($this->user->getName());
106106

107107
foreach ($this->group->getContacts() as $contact) {
108108
if (strtolower($contact->getServiceName()) !== $service) {

0 commit comments

Comments
 (0)