* Michael Bain <mike at mostly-harmless.ca> [22 Jan 2005 20:28]: > Any comments? I know there are a few people out there with a far more > sophisticated user permissions system in mind. However, I think this one > is doable fairly quickly, and is conceptually a simple extension to the > current permissions system. > > -MH > > ----- Forwarded message from scoop-bugs at lists.kuro5hin.org ----- > with the new UserPrefs patch from janra, it seems like it would be pretty easy > to add two new UserPrefs that would contain a list of the perms that a > particular user was allowed or denied (in addition to their regular permissions > as dictated by their user group). the perms code would then have to be changed > to take these two prefs into account. So, rather than creating a special group > like 'UsersNoRate', the deny_perm userpref for that user would contain the perm > comment_rate. Likewise, instead of creating "TrustableUsers", the allow_perm > userpref for that user could contain the perms bypass_safe_mode, upload_user and > super_mojo (or whatever other variants are desired) > > ----- End forwarded message ----- What about section perms? Would those be per-user changeable, or would they stay as they are? Also, $S->have_perm can get either perms for the current user, or for some specified group. I'd imagine that the check for some specified group would be the generic one that doesn't check your two proposed prefs? $S->have_perm would need to be slightly modified to check whether or not a group ID was passed in, which it currently doesn't do; if you're checking a specified group and it happens to be the same group as the current user, you'd get the current user's perms which may not be what you were intending. Actually modifying the perms to reflect the two proposed prefs would be pretty easy, and I just found where it's best done - in _set_perms in Scoop.pm. -- -janra | http://www.write-on.indy/ (OpenNIC) Who needs to be big and burly when | http://www.write-on.org/ (ICANN) you can just apply physics? | Discuss the art and craft of writing