Limit HTMLarea by user role?
Coyote - January 18, 2005 - 20:08
| Project: | Htmlarea |
| Version: | 4.5.x-1.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Description
It would be great to be able to enable/disable HTMLarea by user role.
I've seen suggestions for attaching its use to input formats, and I suspect that would be kind of a hairy problem... since a user might have several input formats available, and the one they are using would effectively be "chosen" _after_ the HTMLarea is already on their screen.
But mostly, I'd just want to have HTMLarea available only to certain users/roles, while preventing others from using it altogether. That would work well enough for me. There's some people I'd want to be able to use HTMLarea, while there's others that I'd _really_ rather just didn't play with it or have it as an option. ; )

#1
See http://drupal.org/node/16051, which doesn't add role-specific limiting, but does provide a default on/off setting for new and anonymous users.
#2
I too am looking for the ability to control by role vs individual users.
I modified the html.module with the new path to add or remove per user.. but it seems to always give a new user the htmlarea by default even though I have selected it not to.
Also...
I have added insertfile plugin and the imagemanager plugin as well. It would be nice if I could turn these on or off based on role as well. Right now.. anyone with HTMLarea has access to these plugin as well... a HUGE security concern. I see a place in the module to add security per plugin but what do I enter there?
Any help would be great.
If someone has a fully patched htmlarea.module file they could send me I would be most thankful!.
;) Still learing Drupal... trying to dev.. but all so new.
#3
Just so that I am clear, you are not wanting any used to not be able to user from using htmlarea by way of the roles, but being able to set the default for enabling htmlarea.
So for example. so a new Authenticated user you could set the role so that authenticated users have htmlareas disabled by default, but the user could change the user setting and override the role based settings.
#4
I have successfully added a role based function for HTMLarea.
Now I can assign permissions to a certain role!
It also hides the "Show Rich Editor" option under their User area if they do not have rights to the tool.
I will now finish it by adding granulatiry of plugins to allow general HTMLarea use but not have access to image manager or insert File plugins.
As soon as I am given CVS access I will add the dif and a full module version to it.
Seems to be a long wait to get into CVS. Busy with getting 4.6 ready I hope.
:) neofactor
#5
please post a patch, do not apply it directly to cvs.
#6
Patch posted.
I had already committed it to CVS as well... so if that needs to get reverse please do so.
#7
Just to let you know, I have reversed it, as I have not got the time today to review the changes and make sure they are ok, and will nto stuff anything else up.
Don't get me wrong, I am not meaning to be a bastard here, but I like to review all the changes before they go in so they don't break anything. Also having the patch submitted means that they can be reviewed by other peopleand commented on.
#8
No Problem at all...
That make complete scense. The owner/developers of the core should be the only people to commit any changes to a new version. My bad on that. Thanks for the understanding.
Just glad to be a part of the process.