Skip to content

CA Admin: Prevent deleting library if used by content or other libraries#2889

Merged
chrieinv merged 2 commits intomasterfrom
CA-admin-stricter-library-delete
Jan 6, 2025
Merged

CA Admin: Prevent deleting library if used by content or other libraries#2889
chrieinv merged 2 commits intomasterfrom
CA-admin-stricter-library-delete

Conversation

@chrieinv
Copy link
Contributor

Content type and libraries could be deleted if content did not use it as main content type, or if was not referenced by other content types or libraries.
Content types can use other content types dynamically, e.g. Course Presentation, this use is not stored in h5p_libraries_libraries. This adds a check if see if any content references the library by using h5p_contents_libraries.

@github-actions github-actions bot added the Component: Content Author All issues that affect content author (sourcecode/apis/contentauthor) label Dec 20, 2024
@chrieinv chrieinv requested a review from emmachughes January 6, 2025 09:25
@chrieinv chrieinv merged commit c197be8 into master Jan 6, 2025
@chrieinv chrieinv deleted the CA-admin-stricter-library-delete branch January 6, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Content Author All issues that affect content author (sourcecode/apis/contentauthor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants