Open navigators based on membership of a role

The code below opens navigator "Two" if the user is a member of the specified role, otherwise navigator "One" is opened.
LotusScript


Sub Postopen(Source As Notesuidatabase)
	
	'**********************************************************************************************
	userRoles = Evaluate("@UserRoles")
	
	Dim FoundRole As Variant
	FoundRole = False
	
	For i = 0 To Ubound(userRoles)     
		If userRoles(i) = "[Admin]" Then 
			FoundRole = True
		End If
	Next
	
	If FoundRole = False Then
		Call source.OpenNavigator( "One" , False )
	Else
		Call source.OpenNavigator( "Two" , False )
	End If
	
	'**********************************************************************************************
	
End Sub

Posted by fbrefere001 on Tuesday March 19, 2002