nebari-dev / jhub-apps

Application creator and general launcher for JupyterHub
https://jhub-apps.nebari.dev/
BSD 3-Clause "New" or "Revised" License
27 stars 12 forks source link

[ENH] - Ability to start stopped shared app, by NOT author #483

Closed aktech closed 1 month ago

aktech commented 2 months ago

Feature description

Imagine two users, Alice and Bob.

Alice creates an app named "Alice in Wonderland" and shares it with Bob. Now when the app is stopped after a while, say by idle culling and Bob access that app, he can't use the app as it's stopped.

We need the ability to start the app "Alice in Wonderland" by Bob.

The assumption is Bob has sufficient permissions in JupyterHub to start the app (otherwise 403).

Value and/or benefit

Following problems will be solved:

Anything else?

No response

kcpevey commented 2 months ago

The assumption is Bob has sufficient permissions in JupyterHub to start the app (otherwise 403).

What roles are required for "sufficient permissions"?

aktech commented 2 months ago

What roles are required for "sufficient permissions"?

We need a custom role with scope "servers" (this can be limited by servers of a user or group as well) for the user to have permissions to start the app.

kildre commented 3 days ago

@aktech This is only for Starting an app correct? A shared user still cannot Stop an app?

aktech commented 3 days ago

@aktech This is only for Starting an app correct? A shared user still cannot Stop an app?

Technically yes, but not enabled by backend at the moment, but I would say to frontend should make an API call to stop (just like other stop app call) and if the response is 4xx then message user, you don't have permissions to stop.

So that if we enable stopping shared app in future then it would work right away without any frontend changes.