Set sys_user_group name sys_dictionary to non unique

Malte_K
Tera Expert

Hi,

 

my company is setting up a MSP with domain separation and we want to allow our customers to name their own groups. This might lead to two customers giving a user group the same name in a different domain.

At the moment this leads to an DB error because there is an unique index on the name field of sys_user_group table.

I am thinking about letting the index be removed and then setting the name field to non-unique.

 

Has anyone done this before? Might there be sideeffects I am not aware of?

 

I guess the alternative would be to automatically add some domain specific identifier to the group name, but I would like to avoid that.

 

Thanks for your answer!

 

Malte

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi @Malte_K 

DON'T DO THIS or you break your system!

Group names have to be unique as there is a API gs.getUser().isMemberOf('<GROUP_NAME>') which is used thousands of times throughout the system. 

However adding domain-specific prefixes is a good idea!

Maik

View solution in original post

4 REPLIES 4

Maik Skoddow
Tera Patron
Tera Patron

Hi @Malte_K 

DON'T DO THIS or you break your system!

Group names have to be unique as there is a API gs.getUser().isMemberOf('<GROUP_NAME>') which is used thousands of times throughout the system. 

However adding domain-specific prefixes is a good idea!

Maik

Wonder why the code is checking the group name and not the sys_id to better allow for more configuration options......

Community Alums
Not applicable

As Mike mentioned - Dont do it!

Actually you dont have an issue as Groups are domain separated so this is handled already.

Malte_K
Tera Expert

Thanks for the fast replies!
I guess we will go with the domain name aproach then.