Base solution for your next web application
Open Closed

Duplicate Permissions Created #7873


User avatar
0
tonyclark69 created

Version: 7.2.0.0 Build: Core / Angular Multi Tenant: Yes

After creating Static Role in TenantRoleAndUserBuilder, first addition of permissions for the role resulted in multiple duplicate DB entries. It appears that for each Create, Edit and Delete function, the code cannot recognise that it has already generated a permission for the parent permission.

Subsequent removal of a permission seems to clean up this issue by removing all the duplicate rows for the specified permission and then adding new rows with IsGranted set to False.

So, this doesn't appear to represent a problem, but might lead to a problem if you assume that there is only a single database entry for each page/function.


4 Answer(s)
  • User Avatar
    0
    ryancyq created
    Support Team

    Hi, is your application run by more than two servers?

    Data seeding is done when application startup. When two applications startup the same time, there might be duplications.

  • User Avatar
    0
    tonyclark69 created

    Running on a single instance. One interesting setup we have is that we're setup for Mutli-Tenant, but a lot of data entities do not inherit IMustHaveTenant or IMayHaveTenant, because these reference data entities need to be used across all tenants (Types, Statuses, etc).

  • User Avatar
    0
    ryancyq created
    Support Team

    can you share the code for TenantRoleAndUserBuilder?

    are you creating permissios for static roles in TenantRoleAndUserBuilder?

  • User Avatar
    0
    ismcagdas created
    Support Team

    This issue is closed because it has not had recent activity for a long time.