-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Adding a UI to let users share their servers to other users and groups #438
base: main
Are you sure you want to change the base?
Conversation
Amazing work! This does not work if |
Thank you for your feedback. Do you have any suggestion to determine the server owner with a cleaner way? |
I think, if the server is running under JupyterHub, one can extract |
There also appears to be an option |
Similarly, |
You can see all available options of |
Omg thank you, I searched hours for this list of PageConfig |
@ykazakov I've pushed the fix, thanks again for your feedback. Could you please try if it works on your Hub? It works on mine but c.JupyterHub.base_url is not set there. |
@Hyrla I tested, now it works with jupyter-collaboration/packages/collaboration/src/sharedlink.ts Lines 56 to 61 in 0f9e77e
Also, if running behind a JupyterHub, shouldn't all these options be set, not just one of them? |
@ykazakov thank you for your feedback. I am pushing a fix concerning the two getOptions() that are misplaced. Concerning the detection of JupyterHub, not all these variables are necessarily set. I did set back the original condition as seen before my pull request:
|
I have been further testing, and in general, the dialog works great! 👍 Some (mostly minor) comments:
|
This should be where the page config vars originate: |
Thank you!
Yes you're right, I will add a "Group" prefix like in the shares list
Do you have any example snippets of code to create such a dialogue ? I wasn't able to find one (I am not an expert at all in TS nor Jupyter extension)
On my Hub there are about 350 users and it works like a charm. I am using the API with pagination, so there is no big query with every users at a single time. But if there is thousands of users it could be a problem. As far as I know, there is no Hub API to search for users or group?
Like for 2., I don't know (yet) a way to create such dialogue but I will add it asap |
Thank you! |
Hello,
I've added the necessary code related to my issue #437.
It replaces the default link share UI in cases where Jupyter is running behind a Hub that allows the creation of shares. It enables users to:
The permissions needed (both in Hub and Lab) are:
"shares!user"
to manage users' shares."read:users:name"
to create shares by designating a user by their name (TODO: check if it's really necessary iflist:users
is already in scope?)."list:users"
(not mandatory) to list users for the search box."list:groups"
(not mandatory) to list groups for the search box."servers!user"
(not mandatory) to allow other users to start and stop the shared serverMy code does not:
list:users
norlist:groups
is in scope. I wanted to add an option to invite someone by typing their exact username, without having to search.This development has been made for my own internal purposes, but I think it could be useful to everyone. Comments and critiques are welcome!