Manage Learn to apply best practices and optimize your operations.

Restrict Field Edit Access Based On Roles

Many companies list groups in their ACLs instead of individuals making it
difficult to evaluate user roles. This code is triggered from the Entering
event on a field allowing you to Evaluate groups to see if a role is enabled
and therefore if that individual is authorized to edit a field.

This code is placed in the Entering event.

Note! You may want to Enforce a Consistent ACL Across All Replicas as an added
security feature.
Sub Entering(Source As Field)

Dim workspace As New NotesUIWorkspace
Dim session As New NotesSession
Dim uidoc As NotesUIDocument

Set uidoc = workspace.CurrentDocument
'Checks to see if you are a member of a group assigned the role

Roles = Evaluate(|@isMember("[RoleName]";@UserRoles)|)

If Roles(0) = 1 Then
'if yes, the code does nothing
Exit Sub
Else
'if no, you are kicked to the top of the document
Msgbox "You are not authorized to enter information in that field" ,
16 , "Warning"
Call uidoc.GotoTop
End If

End Sub

Dig Deeper on Domino Resources - Part 4

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchContentManagement

Close