-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Delete Class Ace #3715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
bump >.< |
@schmittjoh ping |
Is the issue here that internally $index changes when an ACE is removed? I had a similar problem and solved it by iterating through the ACE's in reverse order. |
iterating through the array backwards worked. $classACEs = $currentAcl->getObjectAces();
for ($i=(sizeof($classACEs)-1); $i>=0; $i--)
{
$currentAcl->deleteObjectAce($i);
} its not ideal, but hey ho. |
@samsamm777 is that normal that when wanting to iterate through classes ACEs you perform a $classesACEs = $currentAcl->getObjectAces(); (and then iterating on the object aces) instead of doing a $classesACEs = $currentAcl->getClassAces(); ? I prefer to ask because at this point I wonder whether I'm mistaking or not using acls. |
I got this error today. |
I am also experiencing this issue. Symfony 2.1 |
I had this same issue. In fact my indexes were ok, but when multiple indexes were deleted in one pass, it failed. Solved by reversing the order of the loop as described by @yoannch above |
@Codepadawan what symfony version are you using? |
2.4.2 |
Closing this issue as ACLs are not part of Symfony Core anymore (see #14718 for the initial discussion). It the issue still exists, you can create an issue on symfony/security-acl or symfony/acl-bundle. Thanks. |
Having some issues with this code...
Im thinking there may be a bug in the deleteClassAce function? Gives an error "The index '1' does not exist."
The text was updated successfully, but these errors were encountered: