1
 Follower
16
 Likes

Allow Role management Dynamically.

Backend
On our radar
Instead of having to use CheckXXXXXXrole or GrantXXXXXXrole can we have something like
CheckRole("xxxxxx",User_Id), GrantRole("xxxxxxx",User_Id), Or RevokeRole("xxxxxxxx",User_id)
Created on 15 Oct 2015
Comments (14)
These actions are already available...check the "Users" espace for implemenation.
The only action I can find is a Built-in Function for CheckRole(RoleId, UserId), which can only be used in an expression and not as a separate action in a flow.
GrantRole(RoleId, UserId) and RevokeRole(RoleId, UserId) should also become available as user/system actions. They are currently not available.
You can create custom actions for it without a problem.


I know that custom actions can be created easily in this case, but that means that everybody that needs these actions, have to create the actions themselves. The bigger picture behind the idea-section, in my opinion, is to make Outsystems a better platform. When these actions are delivered with the platform, it would simplify the work for different people.
Why would it simplify it?

If you are allowed to use "strings" to check roles, you only introduce possible runtime errors.
Not to mention, you can check roles in every espace even if it's not yuor own role.
It only makes it easier for developers, but I doubt it will improve the quality of the systems.

Merged this idea with 'Create a GrantRole/RevokeRole actions' (created on 28 Feb 2019 12:06:52 by Marcelo Ferreira)

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)



This comment was:
- originally posted on idea 'Create a GrantRole/RevokeRole actions' (created on 28 Feb 2019 by Marcelo Ferreira)
- merged to idea 'Allow Role management Dynamically.' on 04 Mar 2019 09:19:48 by Kilian Hekhuis

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



This comment was:
- originally posted on idea 'Create a GrantRole/RevokeRole actions' (created on 28 Feb 2019 by Marcelo Ferreira)
- merged to idea 'Allow Role management Dynamically.' on 04 Mar 2019 09:19:48 by Kilian Hekhuis

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.

J.Ja

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.

J.Ja

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.

views
419
Followers
1