Base solution for your next web application
Open Closed

Duplicate Permissions Created #12459


User avatar
0
mmukkara created

Angular/.NET Version: 13 Multi tenancy: Yes

Seems like Permissions are duplicated for the same role, permission name, tenantid. Not sure when and where. I see there was another support ticket (#7873) created before long time for the same issue with no outcome. Can you please explain in what conditions it may happen. Couldn't debug the issue.

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

1 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @mmukkara

    The AbpPermissions table, where permissions are generally managed, is designed to ensure that each permission entry is unique. A duplicate entry in this table usually occurs when a process outside the standard flow is executed.

    Do you have any custom code that automatically assigns permissions to roles when a new tenant is created?

    Have you added a code block that uses the PermissionManager service to grant permissions when roles are updated or when a specific event is triggered (e.g., through an event handler)?

    Such custom implementations, especially if they add permissions without first checking whether the permission already exists, can inadvertently lead to duplicate entries.

    In the AbpPermissions table, assignments are made both on a role basis and on a user basis. To help identify the issue, could you provide a sample records from the AbpPermissions table?

    Any information you can provide on this would be very helpful in identifying the root cause of the issue.

    Thank you

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)