Like we have CheckRole(RoleId, UserId) that is possible to check a role by RoleId would be nice to have actions to grant and revoke roles by Id
GrantRole(RoleId, UserId)
RevokeRole(RoleId, UserId)
It's funny, I always think this exists. Then I spend 15 minutes looking for it. Then I remember it doesn't exist, but I wrote it on the last project I worked on. Then I re-write it. :D
J.Ja
Nope, doesn't exist, only the specific GrantXxxRole. I have this draconion Action that does a Switch based on the role name, it ain't pretty!
Kilian - The easier action just inserts or deletes a record in User_Role, much less code.
Not only in user_role, as priviliges can be non-persistent.
I've never used the non-persistent privileges, I suspect that's not used much at all.
I use them :). Out customer portal is a seperate server, that for security reasons doesn't have any real data on it, including users. The backend sends the priviliges, and I create a temp user for each login, assigining non-persistent roles.
I also use them. My users have access to multiple companies and they can change from one company to another in a combobox in the header. The roles are different in each company. All this is configurable in an admin portal.