getting user group on wiki leval

18 views
Skip to first unread message

Deesh Banneheka

unread,
Aug 24, 2018, 7:43:47 AM8/24/18
to Information Workbench Discussions
Hello Everyone

I have a question about user groups in IWB. 
I am trying to get the user group of current user and pass it to a template. (from Wiki level).
Do you have an example, getting current user group on wiki leval?

Thanks a lot for your feedback.

BR
Jagath

aschwarte10

unread,
Aug 27, 2018, 2:35:33 AM8/27/18
to Information Workbench Discussions
Hi Jagath,

though this use-case it not advisable (i.e. typically UI and code should be clearly separated, especially w.r.t ACL handling), it can be achieved.

You can write a query stored procedure (search the help for "Java Stored Procedure") which returns the user's roles, and use this as wiki parameter in the referenced templates using the #sparql parser function.

Note that a user may have multiple groups/roles.

The best practice would be to solve such use-cases using ACLs, i.e. by granting / restricting access to resources for certain user groups.

Best,
 Andreas
Reply all
Reply to author
Forward
0 new messages