When a user satisfies multiple roles which is in multiple TinyMCE profiles, the TinyMCE profile that is highest alphabetically is selected for the user. This can be confusing when authenticated users are given a basic tinyMCE setup that happens to be high alphabetically.
A couple suggested possible fixes would be
a) only search for the authenticated user role when all other roles have failed to find a match (and then search for the anonymous user role).
b) weights on the profiles
c) create some profile merging functionality between profiles. The simplest way to do this is for each configuration setting select the most "liberal" option: e.g. for a checkbox true might be more liberal than false, so if a user has that checkbox set to true in one profile and false in another then tinyMCE will treat the checkbox as true.
If one of these fixes is appealing to people (in particular if it is appealing to whomever has the authority to merge in patches) then I can attempt to implement it (when I get a chance).
Thanks,
Steven
Comments
Comment #1
asanvicente commentedThanks. I was going crazy trying to figure out why I couldn't control higher roles. They were getting captured by the lower access role (authenticated user) before it could assign more privileges. My solution: I renamed the roles.
Comment #2
codewatson commentedSince its by alphabetical order, the simple and dirty way to fix this is to just add a number before the name of the profile, to signify a weight.
Example: say you have 2 profiles, AProfile and BProfile. AProfile is set to authenticated user, and BProfile is set to another user role. If its loading AProfile instead of BProfile for a user with multiple roles, just change the names of the profiles to "2AProfile" and "1BProfile". They will now be chosen in numerical order first (1BProfile first, then 2AProfile), then alphabetically after the number (at least thats what worked for me).
Ex:
AProfile
BProfile
CProfile
DProfile
EProfile
you want them chosen in this order
CProfile
EProfile
AProfile
DProfile
BProfile
Change the names to this:
3AProfile
5BProfile
1CProfile
4DProfile
2EProfile
and so now they will be chosen in this order:
1CProfile
2EProfile
3AProfile
4DProfile
5BProfile
Hope that makes sense!
Comment #3
asanvicente commentedGood idea. Thanks d!
Comment #4
darren ohDuplicate of issue 132198.