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

Fix: remove views from projects if catalog is changed #1200

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

m6121
Copy link
Member

@m6121 m6121 commented Nov 22, 2024

Description

As described in #1198, if the project's catalog is changed, views that are no longer available are not remove. This PR implements this.

In addition, it sketches the addition of now available views to the project. However, as the user is not available, this is not yet working. If we find a solution, we might similarly, add this if the view is changed in the management interface which currently also implements the removal only.

As the buildin signal post_save does not contain the request object, we may need to move to a custom signal in order to enable filtering based on groups and availability for the user.

ToBeDone:

  • Add tests
  • Decide on automatically adding views to projects (maybe also enabled by setting?)
  • Change to custom signal/include filtering of views based on user permissions
  • Implement adding of views to other signals.

Related issue: #1198

@m6121
Copy link
Member Author

m6121 commented Nov 22, 2024

Hi @jochenklar and @MyPyDavid, what do you think about automatically adding views to projects on either user change of the catalog or change of the view <-> catalog relation within the management interface?

@m6121 m6121 self-assigned this Nov 22, 2024
@coveralls
Copy link

Coverage Status

coverage: 90.476% (-0.002%) from 90.478%
when pulling 4c83585 on fix/1198-views-catalogs-change
into 1eadee5 on main.

@MyPyDavid
Copy link
Member

we still need to think and discuss about this

  • probably with a feature flag for this settings
  • or couple the Views with Catalogs strictly?
  • I can add this method also for tasks to keep it consistent across the models
  • ...

@jochenklar
Copy link
Member

I wrote something in #1198. (I needed to look it up, we already have a feature flag, is used in rdmo/projects/apps.py)

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.

4 participants