determined icon indicating copy to clipboard operation
determined copied to clipboard

chore: Convert permission.name string to permission.id enum [DET-8464]

Open mapmeld opened this issue 3 years ago • 2 comments

Description

Now that permissions are defined in the Proto/API, we can replace check of permission.name == 'create_project' with permission.id == V1PermissionType.CREATEPROJECT.

To make everything work, we need a few changes:

  • Include an V1PermissionType.OSSUSER option for the open source client
  • canMoveExperiment checks that you can DELETEEXPERIMENT from the source and CREATEEXPERIMENT in the destination
  • Similar for canMoveProject
  • Cluster admin is not a permission; it's a role which will include these permissions
  • View Workspaces is not a permission; tbd

Test Plan

  • V1PermissionType changes match (i.e. there is no accidental swap of CREATEEXPERIMENT / CREATEPROJECT)
  • OSS user behavior continues to be normal.

Checklist

  • [x] Changes have been manually QA'd
  • [x] User-facing API changes need the "User-facing API Change" label.
  • [x] Release notes should be added as a separate file under docs/release-notes/. See Release Note for details.
  • [x] Licenses should be included for new code which was copied and/or modified from any external code.
  • [x] If modifying /webui/react/src/shared/ verify make -C webui/react test-shared passes.

mapmeld avatar Sep 26 '22 17:09 mapmeld

Deploy Preview for determined-ui ready!

Name Link
Latest commit 206b4759fa8ecefc5362d2f240b08f3b1b6ac302
Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/633b0fd87946180009e0a5e3
Deploy Preview https://deploy-preview-5121--determined-ui.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Sep 26 '22 17:09 netlify[bot]

Deploy Preview for storybook-det ready!

Name Link
Latest commit 206b4759fa8ecefc5362d2f240b08f3b1b6ac302
Latest deploy log https://app.netlify.com/sites/storybook-det/deploys/633b0fd81b01bb0007a8ba2f
Deploy Preview https://deploy-preview-5121--storybook-det.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Sep 26 '22 17:09 netlify[bot]

OK - restored canViewWorkspaces testable with:

  • viewing in OSS - no issues
  • viewing with &f_rbac=on - see NoPermissions screen
  • view with &f_rbac=on&f_mock_permissions_read=on - you now have permission to read

mapmeld avatar Oct 03 '22 16:10 mapmeld