3
 Followers
7
 Likes

Remove Unused Roles

Service Studio
Out of the scope

Like Remove Unused Dependencies, it is useful to clean some espaces, after a refactor or when we bring many Roles and then we need to remove those we didn't use.

Or put this script on Remove Unused Dependencias, since Roles are dependencias too.

Created on 3 Sep 2018
Comments (6)

Like it :D


The idea I can understand, but in practice, this is impossible.

If a role is selected for a screen because "registered" is selected, the role will be "used" on that screen. So any screen with "registered" access will prevent this from working. Or, if it ignores whether or not that role is used on screens and only looks for Check/Grant actions, it means that if someone is legitimately using those checkboxes, you are removing a role that is providing security.

To make it EVEN HARDER, there are many applications out there which NEVER use Check/Grant actions or otherwise explicitly refer to the role, but do indeed make use of it... anyone who has replaced Users with their own user management system has probably done this, giving a list of roles then creating a UserRole record.

So no matter how I look at this... while the idea itself has its merits... I don't see how this gets implemented.

J.Ja

When you start to work with huge applications with many layers and modules, it is necessary to clean up and organize. It is more rare to use only registered role, 'cause our applications need more security level (customized level).

I agree that if I have registered role checked, all roles will be selected, so none will be removed (and I expect that, of course).

But in many cases we need to clone modules, split it because it become huge to maintaining and then we face this problem. Split among them the many flows inside a espace and each flow has your own group of roles in use. If you delete the flow, many roles will be not in use anymore.


And if you customize your Users (replaced) then it is other use I suppose.

Yeah, again, lots of applications use certain roles and never officially "use" them in a way that Service Studio would detect. This Idea would break those applications (with no warning, either), which is not an acceptable outcome, even if in many other applications it would be very useful.

J.Ja

Changed the category to Service Studio and the status to

Out of the scope


Hey Rafael,

I have to agree with Justin on this one. Due to their specific behavior, roles are "being used" the moment you create them since you are including/excluding them from screens automatically.

Even if no screens have it checked, it might be there for a purpose.

Because of this, we don't have plans to tackle this.

Keep the idea coming!

Changed the category to Service Studio and the status to

Out of the scope


Hey Rafael,

I have to agree with Justin on this one. Due to their specific behavior, roles are "being used" the moment you create them since you are including/excluding them from screens automatically.

Even if no screens have it checked, it might be there for a purpose.

Because of this, we don't have plans to tackle this.

Keep the idea coming!

views
93
Followers
3