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

[EICNET-2972]feat: Add queue to remove items + check if there is media to remove + sensitive permission #2142

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

Dromadoros
Copy link
Contributor

@Dromadoros Dromadoros commented Jul 25, 2023

How to test:

Delete group and his content by queue

  • Get a group where you have a lot of content in it
  • Delete the group (keep an eye about some content title to see if it has not been removed directly)
  • Normally content should not be delete on the group delete action
  • Wait for cron or trigger it (drush core:cron)
  • Verify content has been removed

Sensitive deletion

  • Change a group visibility to sensitive
  • Verify you can still delete the group

Delete media when it's only used once

  • Add a document to a group with a new media in it
  • Delete the group
  • Run cron
  • Verify document has been removed and also the media

@lramarojaona lramarojaona self-requested a review July 31, 2023 09:12
return;
}

if ($node->bundle() === 'document') {
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Dromadoros , here I think we should be generic:

  • Search for any entity reference field
  • For each Media entity reference, look if it's being used somewhere else
  • If not, delete the media

Copy link
Collaborator

@lramarojaona lramarojaona left a comment

Choose a reason for hiding this comment

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

@Dromadoros ,
It works, but please see my comment

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