If User Provider is ServiceCenter, how can you set a custom access role?

If User Provider is ServiceCenter, how can you set a custom access role?

We use the forge componant DBCleaner https://www.outsystems.com/forge/component-versions/423. By default it's access is set to all registered users. For security reasons we want to have specific access roles on all our applications. So for this application a customer role was created DBCleaner_User. This role was applied to each screen.

However on login, we now get the message that this user doesn't have access to this screen.
As the user provider is ServiceCenter (not users) how can we give this role to a user?

Hi,

Did you give this role access to the user trying to access the system? 

If not, access a user, search for the user, and give the user permission to access that role. 

I hope to help.

Hi Paul,

That's the users available in Service Center/ LifeTime, it´s for IT Users.

Hope this help.

Nuno Rolo wrote:

Hi Paul,

That's the users available in Service Center/ LifeTime, it´s for IT Users.

Hope this help.

Thank you for responding. Yup. I understand that if you use the User provider ServiceCenter it will use the users set up in lifetime.
What I'm struggling with is how you can give such a user the rights to a certain role (in this case "dbcleaner_user"). I can't seem to find an option there to add access roles to a user.

I think that the role isn't created, but you can make a login with the service center user. 

Solution

Hi Paul,


If you want to use the your own definied role you can change the User Provider from Service Center to Users and apply only your own role (dbcleaner_user) to the users you want to access the application screens.

If you want to keep Service Center as the user provider you need to build your own administrator screen where you can select a user and grant or invoke the role yourself.

I have made a little example here. I have an eSpace with Service Center as user provider:

I want to give the logged in user the Role "MyServiceCenterTestRoleRole" or revoke the role.

Push the "Grant" button.

The code under the grant button is (you should reply the GetUserId() with the ID of the user you want to grant the role to:


The role will be granted to "Service Center" user.

Cheers,

Johan

Solution

Hello Johan, nice of you to respond here.
I think you are one of the developers who are working on this forge componant DBCleaner right?

Changing the user provider to Users is not possible, as it will stop DBCleaner from working. So you 2nd option is indeed the only way to handle this.
In discussion with Nuno we came to the conclusion that in OutSystems if you pick the user provider "ServiceCenter" it's not possible to assign a customrole to the user in lifetime. So your solution is indeed the only option.
Thanks for your assistance guys.

Hello Paul,

That's correct you can not do it through life time those are other roles.

Just build a small administrator application and your done.
You can build the administrator application in the same eSpace as you defined the role in for example.

Cheers,

Johan 

Ok I understand.
Thanks for your help guys.