SAP Hana Revoke all Priviledge and roles from User -


anyone have written stored procedure can remove assigned roles/privileges given user ? without looking each role assigned or privilege assigned. similar below statement without listing each role , privileges 1 one. removal roles/privilege in 1 single statement regardless of role assigned. user termination process.

call revoke_activated_role('rolename','username');

well if want procedure, i'm using 1 , works.

it removes granted roles user. run if know doing.

create procedure mycleanupuser(in i_user varchar(20)) begin     declare cursor roles         select role_name "public"."effective_roles"          user_name=i_user , grantee_type='user' , role_name <> 'public';      role roles         call revoke_activated_role(role.role_name,i_user);     end for; end; 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -