Hello dear drupal expert!

Trying to find a good solution for segmenting my site (taxonomy, user control..) I often come back to what I had expected drupal to work like - but never found the feature of my dreams: and that is an access control based on the username-access-rules.

I would like to build an easy user-registration that automatically divides the registrants into categories, without the need of pointing them to a specific role by hand afterwards. And because I want the registrant's dedication to one group be visible in the username itself it would make sense to build the site's segmentation up on username (or e-mail/ip) access rules.

So the usernames would look like e.g. (this is possible now with acess rules)

A-username1, A-username2, A-username3
B-username1, B-username2, B-username3

But what I miss is that I can define different Access-control for the groups A-%, B-% and C%.

Maybe I only didn't find how to do it. But 'access-rules' just naturally evoke the idea in my head that there should also be the possibility to DO something with these rules... And it would be nice :-) Maybe my idea isn't realistic at all (lacking of PHP knowledge) and maybe it's also not useful for drupal. But in my case it would be, I'm pritty sure.

Maybe you can give me a hint on how to reach my goal; or maybe it's only an idea for further development; or maybe you only know it better. It would by of help.

Thank you, Stefan

PS. This is my first submission on drupal.org, I'm not sure if i'm post on the correct spot here; if not, please direct me for a next time.


Blitter’s picture

From a cursory look it seems like you'd be better off thinking about Organic Groups and/or Auto Assign Role (http://drupal.org/project/autoassignrole)

lauscherli’s picture

Thank you for the tips, Blitter!

I didn't know Auto Assign Role, I think this is a straight forward solution to begin with.

Actually I hoped to find a role-taxonomy combination, so that not only control over content creation (by assigning different content-types to different roles) can be achieved, but also the division of content (content created with same content types by users with different roles) by different user roles in order to display in galleries or lists.

Do you know if/how roles can also be used as a kind of Taxonomy?

Tank you

Blitter’s picture

OG is still sounding like what you are after. If you've only a few roles/divisions you want to make then you could work it around stock roles using taxonomy and Taxonomy Access Control (http://drupal.org/project/taxonomy_access)

lauscherli’s picture

Thank you. I will definitively try this out another time.
For now I decided on Auto Assign and Views (there's also a 'by user-role' filter).
So the users don't even need to chose taxonomy-terms and just can't post to the wrong section of the site.
And for more delicate-node-types where i want a more precise edit-controle i just create more node-types (that can do the same) and set different access-permission.

To OG: I somehow didn't feel comfortable with it at the time I tried it out. And I heard that it can easily turn to the weak point of a site when traffic rises.