Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cannot delete Portal when Portal Permissions exist #6434

Open
2 tasks done
DanielBolef opened this issue Mar 5, 2025 · 0 comments
Open
2 tasks done

[Bug]: Cannot delete Portal when Portal Permissions exist #6434

DanielBolef opened this issue Mar 5, 2025 · 0 comments

Comments

@DanielBolef
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

I tried to delete a portal, but got a SQL error.

Steps to reproduce?

  1. Create a portal (Don't think you can delete a portal if your instance only has one)
  2. Create a role
  3. Set up at least one portal permission for that role
  4. (Try to) delete that portal via the sites menu

Current Behavior

Foreign key error on the RoleID column of the PortalPermission table, probably when trying to cascade delete roles for the portal in question.

Expected Behavior

Portal is deleted without error.

Relevant log output

Error executing SQL: ;Exec dbo.DeletePortalInfo @0
The DELETE statement conflicted with the REFERENCE constraint "FK_PortalPermission_RoleId". The conflict occurred in database "<my database>", table "dbo.PortalPermission", column 'RoleID'.

Anything else?

The FKs on PortalPermission are missing cascade delete on PortalId, PermissionId, RoleID, and UserID. I suspect this would happen if trying to delete the Portal, Permission, Role, or User associated with Portal Permissions.

Portal Permissions were added in 9.11.0 and not touched since, so this almost certainly affects all versions since then.

Affected Versions

9.13.8 (RC), 9.13.7 (latest release), 10.0.0 (RC)

What browsers are you seeing the problem on?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant