Page 1 of 1

Vision of users in Security tab

PostPosted:Fri Mar 21, 2014 8:26 am
by yv_
Hi,

I am referrring to this old thread. I am wondering if anyone has made a successful implementation of 'filtering' the users seen when you try to edit the security property of a folder/file based on role.

For e.g. I am a user in role 'technical' and would like to only see users from my team who are in the same role as me.

I am currently looking at frontend extensions but still reading through it as I do not know which one to use yet.

Thanks!

Re: Vision of users in Security tab

PostPosted:Fri Mar 21, 2014 8:27 pm
by michaeled
Hi,
We do that with group (not with rôle).
The only limit is that an user is not able to share something to a group he dont belong... I can search and send explanation if you want...?
Regards,
Michael

Re: Vision of users in Security tab

PostPosted:Sat Mar 22, 2014 1:51 pm
by yv_
michaeled wrote:Hi,
We do that with group (not with rôle).
The only limit is that an user is not able to share something to a group he dont belong... I can search and send explanation if you want...?
Regards,
Michael
Hi Michael,

I see. I haven't explored into groups yet. Yes you may explain, it would be very helpful.

Thanks!

Re: Vision of users in Security tab

PostPosted:Sun Mar 23, 2014 7:08 am
by cuongpjh
michaeled wrote:Hi,
We do that with group (not with rôle).
The only limit is that an user is not able to share something to a group he dont belong... I can search and send explanation if you want...?
Regards,
Michael
Hi Michael.
Can you help me explain thoroughly and you are not well understood, thank you.

Re: Vision of users in Security tab

PostPosted:Tue Mar 25, 2014 8:42 am
by jllort
The actual filtering options only allow you to filter by role name or user name. The suggested improvement should not be hard to be implemented if you want some guide in source code tell us

Re: Vision of users in Security tab

PostPosted:Wed Mar 26, 2014 1:07 am
by yv_
Yes, that will be very helpful. I am in need of a better guide. Would it be fine to simply edit the user query from get all users to get users where role = my role, for example?

Re: Vision of users in Security tab

PostPosted:Sat Mar 29, 2014 7:30 am
by jllort
Follow
1- http://wiki.openkm.com/index.php/Developer_Guide ( to configure your development IDE )
2- Then you're interested in this classes:
SecurityPopup -> Main security popup. Here you must be interested in SecurityPanel
Finally for user by role filtering you should do little modification in SecurityUser and SecurityRole, basically in methods getFilteredUngrantedUsers and getFilteredUngrantedRoles
Al must modifiy RPC and servert OKMAuthService, OKMAuthServiceAsync and AuthServlet

Is more easy than you think. Take with pacience and in few minutes you'll get it.

Re: Vision of users in Security tab

PostPosted:Sat Mar 29, 2014 2:44 pm
by yv_
Hey,

Thank you so much for the good support. I get the coding part. Now, I dont know what you mean with the RPC and server part. Yes, I am able to understand it, the vast dependencies just overwhelm me sometimes. :D

Re: Vision of users in Security tab

PostPosted:Mon Mar 31, 2014 11:25 am
by jllort
RPC 0 Remote Process Call ( basically is composed by a server what implement some XXXService and has XXXServiceAsync ( what is used in GWT side ) ).

Look for example DocumentServerlet ( what implement OKMDocumentService and take a look some method referenced from OKMDocumentServiceAsync ). That the ajax mechanism used by GWT to interact with server.