Access Roles FAQ Wanted

I am wrestling with several problems related to the use of access roles within forms, buttons, actions, and so forth, and starting to get very fustrated. Two specific examples:

When I change my role in the ACL for testing purposes and then log out and back in (using F5), sometimes my role is updated, sometimes it is not. I wish there was a way to force LN to recognize my role has changed.

I need to create some buttons that are “hide when” a certain combination of role and document status is achieved. For example, I should not be able to forward a document unless it has been approved and I’m the right person to forward it. Getting both of those criteria correct in Formula language seems harder than it should be.

Can anyone recommend a good, comprehensive guide online on how to use ACL roles effectively, and the various pitfalls and strategies for dealing with them?

I checked the Forum FAQs but did not see anything obvious. David DeJean’s FAQ on “hide-when” was a useful and helpful start, and ideally I’d like to see something similarly descriptive.

Subject: Access Roles FAQ Wanted

I don’t know of a easy way to force LN to update the roles immediately. Remember when using roles that you have to refer to a role in square brackets [rolename].

i.e. !@IsMember(“[HR]”; @UserRoles) means that the button containing this formula in it’s hide when will be hidden if the user currently logged on does not have the HR role assigned to him/her.

Subject: Access Roles FAQ Wanted

One other thing to consider is when testing locally you have to use “Enforce a consistent ACL” option in the advanced ACL properties. Otherwise Roles will behave erratically on local replicas.

Subject: Access Roles FAQ Wanted

One of things that can be with ACL - you have to exit database, and let it be opened again. MEANING - you have to exit it in Notes Designer AS WELL. If you don’t do it - it’s possible that your roles won’t update.From my expirience F5 is like “Lock computer” in windows - it locks it and waits for you to enter password, while not closing database handles.

About @Formula… It is very very easy - put this formula to your button : (Remember, “hide when” is when to hide, not to show button, so use inverse logic)

Status!=“Approved” | @Name([CN];@UserName)=@Name([CN];FieldWithUserNameToCheck)

Another issue - @UserName is an ARRAY, not single value, so remember it when using it in comparitions - always use same translations or same data types - if you put your @UserName in text field - basically you get TEXT with one (or multiple) values - depending on field settings. So, you have to be sure about same types of data - use @UserName comparing to NAMES/READERS/AUTHORS fields and @Name([XXX];@UserName) comparing to names.

hope it helps.

Nahum.