Page 1 of 1

Restrict users and groups list

PostPosted:Tue Aug 05, 2014 10:02 am
by sagar
Hi,

We have configured OpenKM with active directory and when a user wants to modify the access rights for a document he will select from the list of users and groups available on the AD.
My question is: can we restrict for a certain user (or users) to see only a subset of the AD users and groups; but other users will see the full list?

Thanks in advance for your help.

Regards,
Sagar

Re: Restrict users and groups list

PostPosted:Wed Aug 06, 2014 5:55 pm
by jllort
list of users and roles is based on ad search. You can do a search to shown only few users and roles. For example take a look how filtering users based on roles here http://wiki.openkm.com/index.php/Ldap-example3 you can do something similar with roles ( filter based on roles what are membersof some role )

Re: Restrict users and groups list

PostPosted:Thu Aug 07, 2014 5:23 am
by sagar
This will filter the list for all users. What we need is to filter based on the logged in user, for example user X can see only users (Y and Z); but user A can see all users (A,B,C,X,Y,Z).


Regards,
Sagar

Re: Restrict users and groups list

PostPosted:Fri Aug 08, 2014 5:54 pm
by jllort
Here are two possibilities, one could be make some modification in our LdapPrincipalAdapter ( when you get user lists, apply there some filtering ), and other is modify the code of the servlet where is getting roles and users. First has the advantage to be available for all openkm entry points ( frontend, ws etc... ) meanwhile the second will only take effect for UI.

Here you got developer guide http://wiki.openkm.com/index.php/Developer_Guide
Here the class https://sourceforge.net/p/openkm/code/H ... apter.java

Re: Restrict users and groups list

PostPosted:Sun Aug 10, 2014 6:27 am
by sagar
Thanks for your reply.

I will look at them.

Regards,
Sagar