hcl-bot
1
Hi,
I want to get a function that take two parameters :
I want my function returns me true if the username had the parameter role and false the otherwise.
I will try to do the same for another function that takes 2 parameters too :
I want my function returns me true if the username belong to the groupname and false the otherwise.
Can someone help me?
I’m french sorry for my english
Thanks for advance.
Gaëtan
hcl-bot
2
Subject: Calculate a role access
For the first case you should use NotesDatabase.QueryAccessRoles.
I usually do:
dim db as notesdatabase
dim myvar as boolean
…
myvar = not IsNull(ArrayGetIndex(db.QueryAccessRoles(UserName$), “[RoleName]”))
myvar will the be true if the user has the role.
For the second case, you’d need to lookup the Group document in DD and check if the user is in the Members field.
/Peter
hcl-bot
3
Subject: Calculate a role access
Sorry I do not have a function at hand, but you can see many samples in the Designers Help at the classes:
NotesACL
NotesACLEntry