-
Notifications
You must be signed in to change notification settings - Fork 87
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 ACL #71
base: master
Are you sure you want to change the base?
Fix ACL #71
Conversation
* ACL groups incorrectly instantiated without userid -1 leading to many spurious SuperUser ACLs * Regular user anti-lockout had incorrect logic
The grumble server starts again and I can add an @ALL group. The ACL is stored correctly and survives restart of the server unharmed. :) Unfortunately it doesn't seem to have any effect. I haven't tried all permissions, but for example "register self" does not work at all. |
Yeah, seems like this hasn't been working for quite a while and nobody noticed until now. Line 692 in df98375
Line 902 in df98375
It's a bigger fix than just four lines so I don't have time to look at this right now, but even though it technically is a new feature I can't imagine it to be too big. One could probably be inspired by the corresponding implementation in Murmur. |
I thought about it some more and couldn't resist (and besides it wasn't too many lines). The old Now, this doesn't implement ACL caching, but it doesn't come with worse performance than before anyway (because we traversed the entire tree before, too.) It wouldn't be too hard, I just didn't want to impose any design decisions on how it should be structured (but I would probably make an I managed to register myself, but that was all I tested. If you come up with any weird combinations to try out please do. |
Registration works but:
|
Non-merged inheritance seems to be the usual Murmur behaviour (it makes sense since you might want to see where some rule is coming from). Groups were saved (you can e.g. set ACLs on them in the dialog) but there was a problem with lookup. Seems there was a bug where the context chain for groups was never built, so grumble always returned zero groups. Group members were usually not saved (unless you had a lowercase name) because that lookup should be case insensitive according to the Murmur implementation, and it looks like the client just sends a lowercase name. I changed the server lookup table to just use lowercase everywhere adding |
You are right, I didn't test it properly. "Applies to sub-channel" was not set in the group on my Murmur server. After enabling it I see the exact same behaviour on Murmur too. I haven't tested it extensively, but groups seem to work now. |
I dont think it working it automatically switch to superuser - https://i.ravicant.in/9Lb6Fknjp.gif |
Summary (see later comments):
Played around with a few channels and some ACLs and went from "everything is SuperUser and broken" to "seems to be working" at least, but with these issues it seems like the whole of ACLs could use some testing.