Deleting an espace doesn't deactivate the Roles created through the espace

Deleting an espace doesn't deactivate the Roles created through the espace

  

Greeting!

I have come across a scenario where I had created an espace and a role through the same espace. Later, I deleted the espace and I was expecting the role would also get deleted. However, I can see the espace marked as inactive but the associated role is still active.

Thoughts please.

I tried searching for something similar but didn't find anything, apologies if I have missed something obvious.

Hello Akshay,

I cannot replicate this behavior - I was able to delete an espace with roles that had been assigned to users. Can you try to delete the espace via Service Center?

Hi Akshay,

You are correct but after deleting the espace you can not access the role created in that espace.


Reagrds

-SK-

Thank you Grayson and Shashi. Here is what I tried:

  1. Created an espace and a role and published it
  2. Deleted the espace from Service Studio
  3. Created an espace and a role and published it
  4. Deleted the espace through ServiceCenter

In both the scenarios, the espaces got inactive in the database however, the roles are still active. I am fetching the Roles from the Roles tables through code and the supposedly deleted roles are still accessible to me. Screenshot attached for reference.

Solution

Yes Akshay,

You can access Roles  which are associated with deleted espace through code/logic but you can not assign that to a page because if you deleted the espace you can not refer that espace in any module.

In case you are using role from code please make join with espace from which role is associated and also make filter espace.IsActive=True in this way you can deal with roles which are belong from deleted espace.


Reagrds

-SK-

Solution

Thank you, Shashi. Yes, applied the same filter to avoid these roles being fetched from db.