Cache project authorizations even when user has access to zero projects
What does this MR do?
It makes sure that project authorizations are marked as cached even when user has no access to any project. Before this MR we didn't update the cache flag when user has no access to any project which means that we were trying to compute authorizations for this user every time from the beginning.
Does this MR meet the acceptance criteria?
-
Changelog entry added [ ] Documentation created/updated[ ] API support added- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
Closes #26126 (closed)
Merge request reports
Activity
marked the task Changelog entry added as completed
changed milestone to %8.15
added 123 commits
-
6259d543...0499431a - 122 commits from branch
master
- f0ba0018 - Cache project authorizations even when user has access to zero projects
-
6259d543...0499431a - 122 commits from branch
assigned to @DouweM
@DouweM can you take a look as @yorickpeterse is probably not around?
74 74 # remove - The IDs of the authorization rows to remove. 75 75 # add - Rows to insert in the form `[user id, project id, access level]` 76 76 def update_authorizations(remove = [], add = []) 77 return if remove.empty? && add.empty? 77 return if remove.empty? && add.empty? && user.authorized_projects_populated assigned to @yorickpeterse
enabled an automatic merge when the pipeline for f0ba0018 succeeds
@adamniedzielski Looks good, I set it to auto merge.
mentioned in commit 0d930161
mentioned in issue #26163 (closed)
mentioned in commit 8683f58f