Skip to content
Snippets Groups Projects

Cache project authorizations even when user has access to zero projects

Merged username-removed-378947 requested to merge 26126-cache-even-when-no-projects into master
1 unresolved thread

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?

What are the relevant issue numbers?

Closes #26126 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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
  • yorickpeterse-staging added ~978334 ~18308 labels

    added ~978334 ~18308 labels

  • yorickpeterse-staging enabled an automatic merge when the pipeline for f0ba0018 succeeds

    enabled an automatic merge when the pipeline for f0ba0018 succeeds

  • @adamniedzielski Looks good, I set it to auto merge.

  • mentioned in commit 0d930161

  • Robert Speicher removed ~978334 label

    removed ~978334 label

  • Picked into 8-15-stable. Will go into 8.15.3.

  • username-removed-283999 removed ~149423 label

    removed ~149423 label

  • mentioned in commit 8683f58f

  • Please register or sign in to reply
    Loading