kthcloud / console

kthcloud web console
https://cloud.cbh.kth.se
MIT License
3 stars 4 forks source link

Support new deployment deployment visibility modes #322

Closed pierrelefevre closed 2 months ago

pierrelefevre commented 4 months ago

go-deploy has added new visibility modes for deployments instead of just public and private.

We could make some sort of slider instead of the existing toggle switch

--[x]---------[ ]-----------------[ ]------------[ ]---
Public  Private (teams)   Private (only you)    Hidden

<-- More public -- More private -->
Phillezi commented 4 months ago

How about using a ToggleButtonGroup with togglebuttons inside? Quick mockup: image

pierrelefevre commented 4 months ago

Sounds good!

Phillezi commented 4 months ago

Quick question, how is hidden set?

In the struct from go-deploy

...
Visibility string `json:"visibility" bson:"visibility" binding:"omitempty,oneof=public private auth"`
...

which gives these possible values

type visibility = "public" | "private" | "auth" | undefined;

right?

This is my current interpretation, please let me know if I have misunderstood anything: Public --> public Private (Teams) --> private (edit: is this the old hidden mode, and auth is just automatically for either teams or only you if the deployment is not shared?) Private (Only You) --> auth "When auth, deploy a oauth proxy which only allows the deployment owner." Hidden --> ?

pierrelefevre commented 4 months ago

Might be a mistake when writing the issue!

Phillezi commented 4 months ago

This issue or #647?