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

Rework membership on global entities and implement ProjectQueryRole #15644

Merged
merged 25 commits into from
Jun 18, 2024

Conversation

klaustopher
Copy link
Contributor

@klaustopher klaustopher commented May 22, 2024

  • Change the Membership model so that it explicitly supports entity present + project nil
  • Add a ProjectQueryRole and the permissions
  • Add an allowed_to scope for ProjectQuery
  • Change visible and add editable method to ProjectQuery
  • Add tests

Implements https://community.openproject.org/work_packages/55160
Implements https://community.openproject.org/work_packages/55161

@klaustopher klaustopher force-pushed the rework-membership-on-global-entities branch 5 times, most recently from aabe027 to 4eadaa6 Compare May 28, 2024 09:05
@klaustopher klaustopher changed the title Rework membership on global entities Rework membership on global entities and implement ProjectQueryRole May 28, 2024
@klaustopher klaustopher force-pushed the rework-membership-on-global-entities branch 2 times, most recently from 190e7a6 to 9b9e91f Compare June 4, 2024 06:38
@klaustopher klaustopher force-pushed the rework-membership-on-global-entities branch from 2706c65 to c8558a7 Compare June 5, 2024 11:47
@klaustopher klaustopher marked this pull request as ready for review June 6, 2024 08:58
@klaustopher klaustopher force-pushed the rework-membership-on-global-entities branch 2 times, most recently from d907634 to 4da73eb Compare June 11, 2024 09:34
edit_project_query
]
)
end
Copy link
Contributor

Choose a reason for hiding this comment

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

This is an unsolved question on my end. Doing this will have lead to the roles being written to the database. And we definitely want to have that for installations that just do a migration from say 14.0 to the current one. But it will do the same for new instances. And that renders the seeding of the roles worthless.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We had the same discussion when we introduced the roles for WorkPackages. First we planned to do it with seeds only, but later we still added them via a migration as well.

As we have a unique identfier with the builtin column being filled, the migration and the seeds would be idempotent as they would lead to the same result.

I have no problem removing them from the seeds, I just think it's more complete to have them in both.

@klaustopher klaustopher force-pushed the rework-membership-on-global-entities branch 2 times, most recently from dfc0675 to a6c3e2e Compare June 17, 2024 06:35
@klaustopher klaustopher force-pushed the rework-membership-on-global-entities branch from a6c3e2e to dc7002c Compare June 17, 2024 07:35
@dombesz dombesz self-requested a review June 17, 2024 10:45
Copy link
Contributor

@dombesz dombesz left a comment

Choose a reason for hiding this comment

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

Well done @klaustopher !👍 I just left one question.

@klaustopher klaustopher merged commit 040fa72 into dev Jun 18, 2024
9 checks passed
@klaustopher klaustopher deleted the rework-membership-on-global-entities branch June 18, 2024 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants