-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Fix the permissions of the contactsmanager #12369
Conversation
The inspection completed: No new issues |
🚀 Test PASSed. 🚀 |
no - the old implementation is correct - only if the permissions returned by the address book contain the necessary permission the action is executed. |
Mm okay. I have made a test: http://3v4l.org/B8HqW . |
Bloody php .... 31 & 4 = 4
// but
PERMISSION_ALL & PERMISSION_CREATE = 0 |
@DeepDiver1975 Looking. |
@DeepDiver1975 Conceptionally, this patch looks correct. $bitfield & $bitmask will answer whether the bit represented by $bitmask is set in $bitfield. The result is an integer, either 0 for no or $bitmask for yes. This can be implicitly cast to boolean via use in an if statement. I have the feeling you're just seeing #6101 in action here. |
@LEDfan sorry for the confusion - I mixed up the diff - yes your patch looks valid Can I ask you to add a unit test? We don't want to run into this again - THX |
@nickvergessen I'll rebase. @DeepDiver1975 I'm going to write the unit tests :) |
AFAIK the permissions are wrong, and the
delete
orcreateOrUpdate
methods would never been called.CC @DeepDiver1975