access to form element by permissions

Hi there - is it possible to make a content editor form field read-only based on user permissions? For example, a checkbox would be read-only for a basic user of a community but would be editable for someone with admin permissions.

thanks - mikeg

Mike,

Yes, you add a read-only rule for the field.

For Rhythmyx 6.5.2, see “Field Validation, Visibility, and Transform Rules” on p. 99 of the Rhythmyx Implementation Guide.

For Rhythmyx 5.71, see “Visibility and Read-only Rules” on p. 85 of Implementing Content Editors.

RLJII

We have been trying to do this based on the user role. But the users role doesn’t seem to be one of the options to check against.

Kevin,

You need to create a conditional rule using the type User Context/Roles/RoleName. To use Mike’s example, you would create a condition such as

User Context/Roles/RoleName IS NOT LIKE AdminRole

This condition will make the field read-only to All Roles other than the AdminRole.

RLJII

It must be version specific because it won’t let me insert the Roles/RoleName in my 6.1 workbench but it works with a 6.5 test system

We are hopefully upgrading soon so I will wait till then

Hi again - it is working for me. So that others don’t make my mistake - I was entering a conditional stating: User Context/Roles/RoleName <> AdminRole. This did not work but using User Context/Roles/RoleName NOT LIKE AdminRole seems to do the trick.

Mikeq - Thanks for that tip. I just had to make a similar editor change this week, and I would have wasted a lot of time trying to figure out why ‘<>’ didn’t work. I tried it, it didn’t work, and then saw your note here.

Can anyone from Percussion clarify why “NOT LIKE” works and ‘<>’ doesn’t work in this read-only rule?

-Kathleen

Kathleen,

The difference in behavior occurs because a list is being compared to a single string. (If the user was only a member of 1 role, then the 2 ops would behave the same.)

<> - when either or both operands are lists, both lists must be the same size or the condition is considered true. If they are the same size, then if any pair of entries are not equal, the condition is true. In most cases of role membership, the list of roles for a user is going to be more than 1 and thus the condition will almost always be true.

NOT LIKE - this op doesn’t care about the size of the lists. For each entry in the first list, it compares it to all entries in the 2nd list (in this case, just the single, hard-coded value.) If any of these match, the condition fails.