Hi,
I have a page in which i would like to display people with “[Manager]” role. I tried to embed a view there, but it turned out that i can’t solve it with view selection.
Can you suggest me a proper way to do it?
Regards,
M.G.
Hi,
I have a page in which i would like to display people with “[Manager]” role. I tried to embed a view there, but it turned out that i can’t solve it with view selection.
Can you suggest me a proper way to do it?
Regards,
M.G.
Subject: Roles as display determinant
Firstly, are you trying to display people with the [Manager] role as described by the ACL (e.g. a server could have the Manager role), or as contained by a field in “person” documents within your application.
If the first option, and you know the user names, then you could programatically use the db.QueryAccessRoles(usr$) to determine if each user has the [Manager] role. You’d probably be better served to switch from a page to a form as you have to use LS.
If the second option, then what is the issue?
Subject: RE: Roles as display determinant
[Manager] role is defined in ACL, and is associated to people in “Admin_HR” group. Sorry for not mentioning this - not enough coffee…
I would prefer to avoid LS, but if there’s no other way…
Regards,
M.G.
Subject: RE: Roles as display determinant
I don’t see any other way myself. ACL stuff generally requires LS (or java).
You’d have to iterate through the ACL, determine which ones have the [Manager] role, and then expand any groups you have in order to display the actual users.
To expand a group, you could use the undocumented function,
@ExpandNameList(servername; groupname).
However, if you restricted the [Manager] lookup to the known Admin_HR group, conceivably you could use the page with a computed field,
@ExpandNameList(@Subset(@DbName;1); “Admin_HR”).
Note that @ExpandNameList does not work on all groups, it omits groups such as those tagged as ACL only, deny access groups, etc.
You may have to enclose the group name in square brackets, it’s been a while since I’ve had need to use the function.