Skip to content

Add deletion of group_folders_groups in FolderManager#4404

Merged
provokateurin merged 5 commits intonextcloud:masterfrom
kevin-256:master
Mar 5, 2026
Merged

Add deletion of group_folders_groups in FolderManager#4404
provokateurin merged 5 commits intonextcloud:masterfrom
kevin-256:master

Conversation

@kevin-256
Copy link
Copy Markdown
Contributor

Automatically removes associated permissions upon groupfolder deletion to maintain database consistency and cleanliness.

Copy link
Copy Markdown
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but if you don't mind, could you check the other tables as well? They don't seem to be cleaned up either, so this would be nice for completeness.

@kevin-256
Copy link
Copy Markdown
Contributor Author

kevin-256 commented Feb 16, 2026

I've checked the other tables and deleted entries related to that folder. The only entries I haven't deleted are those in the oc_group_folders_versions table, which remain when deleting a folder containing a file.
Steps to reproduce:

  • Create a folder.
  • Create an MD file inside it.
  • Edit the file.
  • Delete the folder.

The same issue occurs with 'normal' folders and 'normal' files outside group folders, so I think the problem is in the Files app. These entries may be kept in the database for logging purposes, so I'm not sure if deleting data from oc_group_folders_trash is appropriate.

Copy link
Copy Markdown
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please wrap everything into a transaction, to avoid left-over data if one of the queries fails.

@kevin-256 kevin-256 force-pushed the master branch 2 times, most recently from f81ef33 to 8f86e27 Compare February 17, 2026 20:07
Copy link
Copy Markdown
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Member

@provokateurin provokateurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

kevin-256 and others added 5 commits March 5, 2026 12:08
Automatically removes associated permissions upon groupfolder deletion to maintain database consistency and cleanliness.

Signed-off-by: Kevin <76160206+kevin-256@users.noreply.github.com>
…es from other tables

Added deletion of folder entries from the `oc_group_folders_manage` and `oc_group_folders_trash` tables during folder removal. Also reordered the deletion sequence in case foreign key constraints are added to the database in the future.

Signed-off-by: Kevin <76160206+kevin-256@users.noreply.github.com>
…oup_folders_trash and group_folders_versions

Signed-off-by: kevin-256 <76160206+kevin-256@users.noreply.github.com>
Co-authored-by: Kate <26026535+provokateurin@users.noreply.github.com>
Signed-off-by: Kevin <76160206+kevin-256@users.noreply.github.com>
Signed-off-by: provokateurin <kate@provokateurin.de>
@provokateurin provokateurin merged commit 99654b2 into nextcloud:master Mar 5, 2026
50 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants