Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

(feat) add repo meta write rbac#52078

Merged
erzhtor merged 6 commits into
mainfrom
erzhtor/add-repo-meta-edit-rbac
May 18, 2023
Merged

(feat) add repo meta write rbac#52078
erzhtor merged 6 commits into
mainfrom
erzhtor/add-repo-meta-edit-rbac

Conversation

@erzhtor

@erzhtor erzhtor commented May 17, 2023

Copy link
Copy Markdown
Contributor

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 a team, ryphil and toolmantim 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

sourcegraph-buildkite commented May 17, 2023

Copy link
Copy Markdown
Collaborator

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

sourcegraph-bot commented May 17, 2023

Copy link
Copy Markdown
Contributor

📖 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
@erzhtor erzhtor deleted the erzhtor/add-repo-meta-edit-rbac branch May 18, 2023 09:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants