coder / coder/coder

Add /api/v2/deployment/stats to Members access

Aperta
#15,368 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
s2
Lingua principale
Go
Stelle
14.5k
Fork
1.5k
Merge medio
1g 20h
PR unite (30g)
601

Descrizione

Seems that Members dont have access to endpoint `/api/v2/deployment/stats` which blocks the possibility to display Coder WS stats on the UI

![Image](https://github.com/user-attachments/assets/41aec978-1af9-40d9-affa-8719aee40516)

```
2024-11-04 19:26:12.267 [warn] coderd: requester is not authorized to access the object internal_error= request_id=b887dc8e-504a-4365-
9aad-d996e3c22d90 roles="[member organization-member:3f784827-371b-49d0-8c29-9f8a72b79f7f]" actor_id=f7747fab-f5b4-4dea-b434-
a51cbaad9a66 actor_name={"FriendlyName":"xxx","ID":"f7747fab-f5b4-4dea-b434-a51cbaad9a66","Roles":
[{"name":"member","display_name":"Member","site":[{"negate":false,"resource_type":"assign_role","action":"read"},
{"negate":false,"resource_type":"oauth2_app","action":"read"},{"negate":false,"resource_type":"provisioner_daemon","action":"read"},
{"negate":false,"resource_type":"workspace_proxy","action":"read"}],"org":{},"user":[{"negate":false,"resource_type":"api_key","action":"*"},
{"negate":false,"resource_type":"assign_org_role","action":"*"},{"negate":false,"resource_type":"assign_role","action":"*"},
{"negate":false,"resource_type":"audit_log","action":"*"},{"negate":false,"resource_type":"debug_info","action":"*"},
{"negate":false,"resource_type":"deployment_config","action":"*"},{"negate":false,"resource_type":"deployment_stats","action":"*"},
{"negate":false,"resource_type":"file","action":"*"},{"negate":false,"resource_type":"group","action":"*"},
{"negate":false,"resource_type":"group_member","action":"*"},{"negate":false,"resource_type":"license","action":"*"},
{"negate":false,"resource_type":"notification_preference","action":"*"},{"negate":false,"resource_type":"notification_template","action":"*"},
{"negate":false,"resource_type":"oauth2_app","action":"*"},{"negate":false,"resource_type":"oauth2_app_code_token","action":"*"},
{"negate":false,"resource_type":"oauth2_app_secret","action":"*"},{"negate":false,"resource_type":"organization","action":"*"},
{"negate":false,"resource_type":"provisioner_daemon","action":"*"},{"negate":false,"resource_type":"provisioner_keys","action":"*"},
{"negate":false,"resource_type":"replicas","action":"*"},{"negate":false,"resource_type":"system","action":"*"},
{"negate":false,"resource_type":"tailnet_coordinator","action":"*"},{"negate":false,"resource_type":"template","action":"*"},
{"negate":false,"resource_type":"workspace","action":"*"},{"negate":false,"resource_type":"workspace_proxy","action":"*"},
{"negate":false,"resource_type":"provisioner_daemon","action":"read"},{"negate":false,"resource_type":"provisioner_daemon","action":"create"},
{"negate":false,"resource_type":"provisioner_daemon","action":"read"},{"negate":false,"resource_type":"provisioner_daemon","action":"update"},
{"negate":false,"resource_type":"user","action":"read"},{"negate":false,"resource_type":"user","action":"read_personal"},
{"negate":false,"resource_type":"user","action":"update_personal"},{"negate":false,"resource_type":"workspace_dormant","action":"read"},
{"negate":false,"resource_type":"workspace_dormant","action":"delete"},{"negate":false,"resource_type":"workspace_dormant","action":"create"},
{"negate":false,"resource_type":"workspace_dormant","action":"update"},{"negate":false,"resource_type":"workspace_dormant","action":"stop"}]},
{"name":"organization-member:3f784827-371b-49d0-8c29-9f8a72b79f7f","display_name":"","site":[],"org":{"3f784827-371b-49d0-8c29-9f8a72b79f7f":
[{"negate":false,"resource_type":"organization","action":"read"},{"negate":false,"resource_type":"assign_org_role","action":"read"}]},"user":
[{"negate":false,"resource_type":"organization_member","action":"read"}]}],"Groups":null,"Scope":"all"} scope=all route=/api/v2/deployment/stats
action=read object={"id":"","owner":"","org_owner":"","any_org":false,"type":"deployment_stats","acl_user_list":null,"acl_group_list":null}
```

Users without admin powers:

![Image](https://github.com/user-attachments/assets/7fa6cb5f-200c-4362-8f35-929cfb7054fd)

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.