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

(feat) add repo meta write rbac #52078

Merged
merged 6 commits into from May 18, 2023
Merged

(feat) add repo meta write rbac #52078

merged 6 commits into from May 18, 2023

Conversation

erzhtor
Copy link
Contributor

@erzhtor erzhtor commented May 17, 2023

Part of https://github.com/sourcegraph/pr-faqs/issues/96.

This PR:

  • adds REPO_METADATA#WRITE RBAC
  • adds RBAC check for repo metadata create/delete/update
  • adds RBAC check for UI repo metadata edit page

Test plan

  • sg start
  • Enable repository-metadata feature flag
  • Go to any repository page and check that there is a gear icon/link available near metadata. Click it and it should open repo metadata edit page
  • Uncheck REPO_METADATA#WRITE permission for your current non-admin user https://sourcegraph.test:3443/site-admin/roles. NOTE: that admin users will have all permissions and they are not revokable
  • Go to any repository page and check that there is NO gear icon/link available near metadata

Screenshots

Screen.Recording.2023-05-17.at.21.28.33.mov

@erzhtor erzhtor requested review from toolmantim, ryphil and a team May 17, 2023 15:34
@erzhtor erzhtor self-assigned this May 17, 2023
@cla-bot cla-bot bot added the cla-signed label May 17, 2023
@sourcegraph-buildkite
Copy link
Collaborator

sourcegraph-buildkite commented May 17, 2023

Bundle size report 📦

Initial size Total size Async size Modules
0.01% (+0.30 kb) 0.02% (+2.25 kb) 0.02% (+1.96 kb) 0.00% (0)

Look at the Statoscope report for a full comparison between the commits f30052f and 97910a6 or learn more.

Open explanation
  • Initial size is the size of the initial bundle (the one that is loaded when you open the page)
  • Total size is the size of the initial bundle + all the async loaded chunks
  • Async size is the size of all the async loaded chunks
  • Modules is the number of modules in the initial bundle

@sourcegraph-bot
Copy link
Contributor

sourcegraph-bot commented May 17, 2023

📖 Storybook live preview

@erzhtor erzhtor force-pushed the erzhtor/add-repo-meta-edit-rbac branch from bd2a052 to c3312d0 Compare May 18, 2023 08:47
@erzhtor erzhtor merged commit a6ae5b8 into main May 18, 2023
23 of 24 checks passed
@erzhtor erzhtor deleted the erzhtor/add-repo-meta-edit-rbac branch May 18, 2023 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants