Topic: Fully customizable groups privileges

OK,

I think it would be greate if the permission that are set per group would be extended.

Like it is now:

You have 1 admin group, and 1 moderator group with fixed privileges for both.

Like I would be:

You have 1 admin group and can have multiple moderator groups, so you can give each moderator group separated privileges.

For example:
Board mods: can sticky, close and move topics in certain forums
Board senior mods: can do everything the board mods can but can also delete posts in the forums.

Off course there will stay 1 admin group wich has access to everything.

I think this will improve the configurability and customizability off punbb a lot, and it will clean out those hard coded permissions in the code.

Basicly it wont be that hard, its just a lot off work tweaking every file.


Second purposal smile
Add an disable/hide option to posts.

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

Re: Fully customizable groups privileges

This is in the todo list for 1.3: "Multiple moderator groups"

This means the "moderator status" will be like any other permission. You will be able to make any group moderator. If there will different types of moderators, i doubt it. Why make someone moderator that you don't trust?

Re: Fully customizable groups privileges

Allowing multiple groups to have moderator powers is planned for 1.3
However, I don't think you'll see the moderator powers being broken down into pieces that you can allow/disallow per group, at least not in the core: maybe an extension.

And as for hiding posts, I'm pretty sure that would be an extension as well, although I believe 1.3 will allow you to have a moderation queue for posts and topics

Re: Fully customizable groups privileges

ok, cool

Anything i can help on in developping for 1.3?

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

Re: Fully customizable groups privileges

i still think stuff like this should not be in the code:

if (!$pun_user['is_guest'])
// do stuff
else
//dos omething else

even stuff like this should be handeled by some sort off privil engine/class

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

Re: Fully customizable groups privileges

Err, why?
The code seems very straight-forward to me, I can't see why you would want to change it

Re: Fully customizable groups privileges

well, here a guest user is handeled diferent then a regular user and this is hardcoded into the engine.

i think it would be better/nicer/easyer if this wans't hardcoded,

this way you could define every function in the system with an acces sprivilege, so its more customizable.

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

8

Re: Fully customizable groups privileges

Cereal wrote:

i think it would be better/nicer/easyer if this wans't hardcoded.

The question isn't whether it would be better/nicer/easier, the question is whether a large percentage of PunBB users really need it.

Re: Fully customizable groups privileges

yeah, true

its just an idea smile
and  i think it would be cool smile

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

10

Re: Fully customizable groups privileges

yeah its exactly for cases like this this would be really good.

I have a simular case where it would be handy if it was in punbb already.

I'm willing to do all the changes neeeded for it, but i don't think its possible to release it as a mod, since it most files will need to change for this.

~Cereal
I've finally learned what "upward compatible" means. It means we get to keep all our old mistakes.
The limits of language are the limits of one's world.

Re: Fully customizable groups privileges

This seems like a common sense addition.  The forums that just have a simple admin/moderator/member structure seem to be in the minority to me.

Re: Fully customizable groups privileges

It isn't as "common sense" as it seems. tongue
Multiple moderator groups are going to be a part of 1.3. The issue then becomes, where do you stop adding new features? Do you have permissions on a group-forum basis for deleting, stickying, etc? Do you have the ability to stop specific groups from viewing specific pages at all? etc
PunBB is meant to be lightweight and simple. Hence why there isn't a built in PM system, etc. If you need 5 levels of administrators, 10 levels of moderators, and you have a bunch of individuals that need their own unique permissions, then you probably would be better off looking at phpBB. However, I personally think multiple moderator groups solves most basic permissions problems (the only other thing I can think of would be allowing a user to have multiple groups, which I'm sure could take the form of an extension)

Re: Fully customizable groups privileges

I would agree, but it's not so much as an extra feature as a replacement for the feature as it is now.  I understand why PunBB is light on features, but I don't think that's really the issue in this particular case.  If anything this feature could be used to reduce bloat by merging the "Permissions" and "User Groups" sections together, which at the same time would make the board much more flexible.  But I guess it's ultimately up to Rickard.

Re: Fully customizable groups privileges

I would agree, but it's not so much as an extra feature as a replacement for the feature as it is now.

1 - 1 + 2 > 1 tongue

If anything this feature could be used to reduce bloat by merging the "Permissions" and "User Groups" sections together, which at the same time would make the board much more flexible

As I "stated" above, removing smaller features and adding a giant feature does not negate the bloat argument. Flexibility does not either.
Not everyone needs/wants access controls for every page, or multiple user groups for a single user, or group-forum permissions for every single moderator level action. Thus, those that do can use an extension written to provide that functionality and those that don't aren't bothered with the excess code.

15 (edited by Malphas 2006-06-12 02:22)

Re: Fully customizable groups privileges

How do you know there will be any excess code?  The fact it would be more flexible wasn't meant to negate the bloat argument, it was an added advantage.  You're looking at this from a different angle, which is fair enough, but to me having the two seperate features seems redundant when they could be merged, and don't think this equates to "removing smaller features and adding a giant feature" either, but as I'm not Rickard, I obviously wouldn't know for certain.

Just to clarify, the sort of of feature I'm trying to describe wouldn't make things any more complex unless the administrator wishes to.  You can still have the admin/moderator/member groups set up as they are now in the default installation; the difference is that the administrator will have the option to remove/add/modify the groups (which is why the permissions would be merged into the user groups section obviously).  This seems like a cleaner and more streamlined way of managing these features to me.  I'm not sure if this would make sense as an extension seeing as it's more like a complete replacement of how PunBB currently works, rather than just adding an additional feature.

Re: Fully customizable groups privileges

Since the administrator already can add/delete/edit regular member groups, I assume you mean for moderators/administrator/guest level groups. What would be some more features that would be added?
And when you write the code you can prove to me that it isn't huge, complex, whatever. Until then, I'll go with my thoughts that adding multiple groups for every possible level of access and more complex permissions levels for every group will be quite a bit more complex then what you have now tongue

17 (edited by Malphas 2006-06-12 02:42)

Re: Fully customizable groups privileges

Yeah, you'd add/delete/edit as usual basically, except the options from the permissions section would also be available in the group settings, thus negating the need to have them under a seperate heading.  And there's no need to be curt; unless you've been working on the code yourself (in which case, fair enough) your opinion on whether on not this is going to add bloat is no more valid than mine.  Like I said, I don't work on PunBB so I can't make that kind of call, only Rickard, Paul, et al. can.

18

Re: Fully customizable groups privileges

Smartys does do work on the code mainly in the bug tracking/fixing and beta testing area. He knows his way around the code rather better than most.

Re: Fully customizable groups privileges

Oh, that's what you want? tongue
Aside from the fact that several of the permissions make sense only for specific groups (ie: the guest email one, the registration ones, etc) and the moderator features (which may/may not become part of the group system once you can have multiple moderator groups), the other permissions seem to have to do with the use of BBCode, caps, and signature length. In other words, at least IMO the features would be excessive: an administrator shouldn't need a larger sig, and if you want to reward your users by allowing them BBCode, longer sigs, etc in a certain usergroup, then you can write a mod for it smile
And as Paul said, I am quite familiar with the code: sorry if I seemed curt though, I really just wanted to know specifically what it was you wanted to add smile

Re: Fully customizable groups privileges

I think PunBB could stand to take a page out of the Wordpress book in a lot of these cases. How about you skimp on the feature additions, and instead work on building up a nice corpus of plugin hooks? Then functionality that some value more than others can simply be implemented as a plugin... even if the plugin gets included with the default installations, it'll be something you can remove if you don't want it.

Then you can have code like:

if (!$pun_user['is_guest'] or plugin_force_guest())
// do stuff
else
//do other stuff

Of course, if there were a proper permissions handling library/object, then the hooks could be placed inside of that, but w/e. (I'm cautious about advocating too much abstraction... one of the huge strengths of Pun is how completely easy it is to find the code you're looking for...)

21 (edited by Smartys 2006-06-12 15:44)

Re: Fully customizable groups privileges

mikepurvis wrote:

I think PunBB could stand to take a page out of the Wordpress book in a lot of these cases. How about you skimp on the feature additions, and instead work on building up a nice corpus of plugin hooks?

That's the idea behind extensions wink
A demo Rickard put up: http://punbb.org/stuff/extdemo/