What is SS_Key attribute of Role Table, how to get this value and what is its usage?

Hello Team,

We have a requirement of Creating Dynamic Role by application admin.

I was able to create dynamic role, but have no idea about the SS_Key attribute of Role Table.

Can any one please help me out in understanding this attribute, how i can get the correct value while creating the role and why it is used for?

Thanks,

Preeti Kumari

Hi,


Why do you want this in the system-tables?

I mean, at designtime you are providing screen-access, so even if you are able to create those roles dynamically, you cannot enforce that.

Ergo, if you want also those kind of rights done on screenlevel, you better end up having your own roles/rights entities where you can create them yourself.

simply add a function in the preparation or on buttons etc. to check the roles and you are set..


Besides, I suggest also to ask why they have a need for "dynamic" roles?

Or do you happen to mean, assigning roles to users dynamically?



J. wrote:

Hi,


Why do you want this in the system-tables?

I mean, at designtime you are providing screen-access, so even if you are able to create those roles dynamically, you cannot enforce that.

Ergo, if you want also those kind of rights done on screenlevel, you better end up having your own roles/rights entities where you can create them yourself.

simply add a function in the preparation or on buttons etc. to check the roles and you are set..


Besides, I suggest also to ask why they have a need for "dynamic" roles?

Or do you happen to mean, assigning roles to users dynamically?


Thanks for the information.

Yes, we want roles to be assigned to users also dynamically.



Hi Preeti,

when you create a role by front end with espace id, any SS_key generate by default or not.


Regards

Rahul Sahu

SS_keys are used in a multitude of entities to have a "hash-like" attribute which is used to link multiple entities.
I believe lifetime is also using it for deployments to link correct stuff even though there are differences between environments.

Honestly you would need to look at the servicecenter/system module in order to know what it does on creation.

There's something in the users module which automatically sets it to the admin users though. But I'm guessing it will generate an ss_key on creation like it does for other system entities.

Solution

Hi,

If you require dynamic roles in your application, this is something that needs to be separate from the OutSystems role system - writing records to the Role Entity won't allow you to use them within Service Studio as regular Roles. And as its a System Entity, what happens within is a black box - fields like the SS_Key should not be tampered with.

You'd have to create your own Role system with a set of Entities (a CustomRole Entity and a CustomRole_User Entity to associate users with your custom roles at the very least), and within every page, you'd have to check this data.

Solution

Hi ,

SS_Key attribute in system table


SS_Keys

  • The Espace always have a unique SS_Key generated and stored in the metamodel and equal in all environments

  • SS_Keys are not unique for Entity and Entity_Attr, for example, cloned Espace

  • Entity_Record has a composed key with SS_Key and Entity_SS_Key



Regards

Rahul Sahu

Rahul Sahu wrote:

Hi Preeti,

when you create a role by front end with espace id, any SS_key generate by default or not.


Regards

Rahul Sahu

No SS_key is not generate by default while creating role by front end with epasce Id


Joey Moree wrote:

SS_keys are used in a multitude of entities to have a "hash-like" attribute which is used to link multiple entities.
I believe lifetime is also using it for deployments to link correct stuff even though there are differences between environments.

Honestly you would need to look at the servicecenter/system module in order to know what it does on creation.

There's something in the users module which automatically sets it to the admin users though. But I'm guessing it will generate an ss_key on creation like it does for other system entities.

Thanks Joey for the information.

Could you please let me know how i can have a look on code which is used on creation?


Afonso Carvalho wrote:

Hi,

If you require dynamic roles in your application, this is something that needs to be separate from the OutSystems role system - writing records to the Role Entity won't allow you to use them within Service Studio as regular Roles. And as its a System Entity, what happens within is a black box - fields like the SS_Key should not be tampered with.

You'd have to create your own Role system with a set of Entities (a CustomRole Entity and a CustomRole_User Entity to associate users with your custom roles at the very least), and within every page, you'd have to check this data.

Thanks Afonso Carvalho, we will go with your customRole Entity approch.


Rahul Sahu wrote:

Hi ,

SS_Key attribute in system table


SS_Keys

  • The Espace always have a unique SS_Key generated and stored in the metamodel and equal in all environments

  • SS_Keys are not unique for Entity and Entity_Attr, for example, cloned Espace

  • Entity_Record has a composed key with SS_Key and Entity_SS_Key



Regards

Rahul Sahu

Thanks Rahul, for this useful information.