-
Notifications
You must be signed in to change notification settings - Fork 76
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
fix: activate superadmin's all vfolder listing feature #1237
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a few things to request. Please refer to the comments below.
@@ -363,11 +363,11 @@ export default class BackendAiResourceBroker extends BackendAIPage { | |||
* Update virtual folder list. Also divide automount folders from general ones. | |||
* | |||
*/ | |||
async updateVirtualFolderList() { | |||
async updateVirtualFolderList(userEmail = false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type of default value of parameter userEmail
doesn't seem to have a match with SDK function in here.
It's string, not boolean.
const ownerEnabled = this.shadowRoot.querySelector('#owner-enabled'); | ||
const userEmail = this.shadowRoot.querySelector('#owner-email').value; | ||
if (ownerEnabled && ownerEnabled.checked) { | ||
await this.resourceBroker.updateVirtualFolderList(userEmail).then(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason for using await
keyword and .then()
keyword at the same time?
src/lib/backend.ai-client-node.ts
Outdated
let reqUrl = this.urlPrefix; | ||
if (groupId) { | ||
const params = {group_id: groupId}; | ||
if (groupId || userEmail) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to use condition statements separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I just updated two things during delegate session creation:
|
@lizable Great! |
resolve: lablup/backend.ai#321
related: lablup/backend.ai-manager#544
When I tested, the function is working.
Trying with the admin accesskey, I get an error. Trying with the folder owner accesskey it succeeds.
But in webui, superadmin can't know all vfolders. This is because superadmin's all folder view function did not work.
It was already implemented in the backend. One parameter required by the backend was missing, so add it.
It works well. (The two folders in the picture below are folders created by different accounts as shown in the picture above.)

To reduce the load, it request only one-time when superadmin check delegated session start checkbox.
