Page 1 of 1

how to link role with profile

PostPosted:Fri Jan 11, 2013 9:15 am
by edwsin
hi there,
is there a way to link a role with profile...?

My goal is to create 1 user to "prevent download, delete, copy, move" other users document but they can "upload, download, delete, copy, move" their own document.
And since 1 user can have more then 1 role, so i ask to you guys, is there a way to link a role with profile.

Best regards,
Edward

Re: how to link role with profile

PostPosted:Sat Jan 12, 2013 5:40 pm
by jllort
No this is not the idea. But you can doing something simply with a simply select ( users who have some role ) you can change their default profile to the profile you want.

Here are the sql which have some interest to you:
Code: Select all
SELECT PRF_ID FROM OKM_PROFILE where PRF_NAME='Default'
SELECT UR_USER FROM OKM_USER_ROLE where UR_ROLE='ROLE_USER';
SELECT * FROM OKM_USER_CONFIG;
And you could do something like:
Code: Select all
UPDATE OKM_USER_CONFIG SET UC_PROFILE=(SELECT PRF_ID FROM OKM_PROFILE where PRF_NAME='Default') WHERE UC_USER IN (SELECT UR_USER FROM OKM_USER_ROLE where UR_ROLE='ROLE_USER');