Base solution for your next web application
Open Closed

Same Static Roles for all tenants #613


User avatar
0
omar created

I would like to use the same static roles for tenants. As of now, I have to create the roles for each tenant every time I create a new tenant. I want to share all four roles for all my tenants. Let's say I can the permissions for the "Student" role, I would have to change it for all tenants. I want all roles for tenants to have the same permission.

public static class StaticRoleNames
    {
        public static class Host
        {
            public const string Sysadmin = "Sysadmin";            
        }

        public static class Tenants
        {
            public const string Admin = "Admin";
            public const string Teacher = "Teacher";
            public const string Student = "Student";
            public const string Parent = "Parent";
        }
    }

Thank you!


2 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    Roles are per-tenant. So, there is no way of sharing roles between tenants. As I understand, you don't need dynamic roles at all (and will not use roles page actually). As a workaround, when you change role permissions, you can update it for all tenants.

  • User Avatar
    0
    omar created

    That worked for me. Thanks