Created
March 26, 2011 01:24
-
-
Save merk/887939 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$oid = new ObjectIdentity('class', $this->threadClass); | |
$sid = UserSecurityIdentity::fromAccount($this->securityContext->getToken()->getUser()); | |
foreach ($this->aclProvider->findAcl($oid)->getClassAces() AS $entry) { | |
if ($entry->getSecurityIdentity()->equals($sid)) { | |
var_dump($entry->getMask()); // Doesnt dump, The user has role ROLE_SUPERADMIN | |
} | |
} | |
$oid = new ObjectIdentity('class', $this->threadClass); | |
$sid = RoleSecurityIdentity('ROLE_SUPERADMIN'); | |
foreach ($this->aclProvider->findAcl($oid)->getClassAces() AS $entry) { | |
if ($entry->getSecurityIdentity()->equals($sid)) { | |
var_dump($entry->getMask()); // Dumps | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment