[UI] Show "Create Workspaces" as enabled when Code privilege is set to Write #2884
Zak Siddiqui opened 5 days ago

Based on OD-2882.


Problem

In the role configuration UI, the Create Workspaces permission toggle appears as OFF for the built-in Code Writer role, even though users with that role can create workspaces. This is because the Write code privilege implicitly grants the Create Workspaces permission (as documented in the Code privilege field help text: "The Write permission implies CreateWorkspaces permission").

This discrepancy between what the UI shows (toggle OFF) and what is actually permitted creates ambiguity and confusion for system administrators managing roles and permissions.

Expected Behavior

When a role's Code privilege is set to Write, the Create Workspaces toggle should be displayed as:

  • ON (reflecting the effective permission), and
  • Disabled / greyed out (indicating it is implied and cannot be independently turned off while Code privilege remains Write).

This would make the role screen accurately reflect the effective permissions at a glance.

Current Behavior

RoleCreate Workspaces ToggleCode PrivilegeCan Actually Create Workspaces?
Code WriterOFF (misleading)WriteYes (implied by Write)
Issue ManagerOFFReadNo
Workspace CreatorONReadYes (explicit flag)

The Code Writer row is the source of confusion — the toggle says OFF but the permission is effectively granted.

Proposed Change

  1. Primary (preferred): When Code privilege is set to Write, automatically show the Create Workspaces toggle as ON and disabled (implied by Write), so the UI reflects the effective permission state.
  2. Fallback (minimum): Add a clarifying note next to the Create Workspaces checkbox stating that workspace creation is already enabled because Code privilege is set to Write. This should be in addition to the existing note on the Code privilege field.
  • Robin Shen commented 4 days ago

    When a permission is enabled, all other permissions it implies will be invisible. The same will be handled between code write and workspace create.

  • Zak Siddiqui commented 4 days ago

    When a permission is enabled, all other permissions it implies will be invisible. The same will be handled between code write and workspace create.

    That is absolutely perfect.

  • OneDev commented 2 days ago

    State changed as build OD-7846 is successful

  • OneDev changed state to 'Closed' 2 days ago
    Previous Value Current Value
    Open
    Closed
1/1
Type
Improvement
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (2)
Reference
OD-2884
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover