Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revoke shared folder permission doesn't working properly #2545

Open
lizable opened this issue Jul 12, 2024 · 0 comments · Fixed by #2644
Open

Revoke shared folder permission doesn't working properly #2545

lizable opened this issue Jul 12, 2024 · 0 comments · Fixed by #2644
Assignees
Labels
type:fix Fix features that are not working urgency:blocker IT SHOULD BE RESOLVED BEFORE DISTRIBUTING urgency:4 As soon as feasible, implementation is essential.
Milestone

Comments

@lizable
Copy link
Contributor

lizable commented Jul 12, 2024

What Operating System(s) are you seeing this problem on?

Linux (x86-64)

Backend.AI version

24.09.0dev1

Describe the bug

Revoking the access permission of shared folder from invited user doesn't work properly.

To Reproduce

⚠️ NOTE: You need two user accounts (user A, user B) to test this issue.

  1. Login with user A account.
  2. Go to Data & Storage menu.
  3. Click Share folder icon button(Screenshot 2024-07-12 at 4 04 20 PM) in Controls column.
  4. Add user B email address with any permission.
  5. Click SHARE button.
  6. Logout user A account and login with user B account.
  7. See invitation panel in Summary page.
  8. Accept the invitation.
  9. Logout user B account and login with user A account.
  10. Go to Data & Storage menu again.
  11. Click Modify Permission icon button (Screenshot 2024-07-12 at 4 07 08 PM) in Controls column.
  12. Change the current permission to "kick out user".
  13. Logout user A account and login with user A account.
  14. Go to Data & Storage menu.
  15. See the error.

Expected Behavior

When the permission per each shared folder has been changed to "kicked-out", then the invited user shouldn't be able to get access to the shared one.

Anything else?

No response

@lizable lizable added urgency:blocker IT SHOULD BE RESOLVED BEFORE DISTRIBUTING type:fix Fix features that are not working urgency:4 As soon as feasible, implementation is essential. labels Jul 12, 2024
@lizable lizable added this to the 24.03 milestone Jul 12, 2024
@lizable lizable changed the title Revoke folder permission doesn't working properly Revoke shared folder permission doesn't working properly Jul 12, 2024
@lizable lizable self-assigned this Jul 12, 2024
@agatha197 agatha197 assigned agatha197 and unassigned lizable Aug 19, 2024
yomybaby pushed a commit that referenced this issue Aug 23, 2024
…y permissions modal. (#2644)

resolves #2545
related PR: lablup/backend.ai#2731, lablup/backend.ai#2740

### TL;DR

Fix a bug that changes the permissions of other people in the shared list.

### What changed?

- Updated the translation key for renaming a folder from 'data.folders.RenameAFolder' to 'data.explorer.RenameAFolder'.
- Refactored the permission modification logic to improve type safety and readability.
- Fixed a syntax error in the "Kick Out" list item by removing an extra quotation mark.

### How to test?
1. check out core branch to lablup/backend.ai#2740, and cherry pick lablup/backend.ai#2731
2. Navigate to the storage list component.
3. Attempt to rename a folder and verify the correct translation is displayed.
4. Modify permissions for shared folders and ensure the changes are applied correctly.
5. Check that the "Kick Out" option in the permission dropdown works as expected.
6. Check the permission select has valid value just after accepting the invitation.

### Why make this change?

These changes improve the user experience by ensuring correct translations are used and enhance the reliability of permission management. The refactored code also improves maintainability and reduces potential bugs related to type mismatches.

### Screenshot
<img width="542" alt="image" src="https://github.com/user-attachments/assets/17b8cf7e-fc7a-4975-ab9d-baebe479bbd0">
<img width="537" alt="image" src="https://github.com/user-attachments/assets/22e16773-322b-4686-83e3-b284aaf654db">
<img width="543" alt="image" src="https://github.com/user-attachments/assets/4aab0493-c31f-4178-8504-2d0f10293070">

---

**Checklist:** (if applicable)

- [x] Mention to the original issue
- [ ] Documentation
- [x] Minium required manager version: 23.09
- [x] Specific setting for review (eg., KB link, endpoint or how to setup): refer [#2545](#2545)
- [x] Minimum requirements to check during review
- [ ] Test case(s) to demonstrate the difference of before/after
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:fix Fix features that are not working urgency:blocker IT SHOULD BE RESOLVED BEFORE DISTRIBUTING urgency:4 As soon as feasible, implementation is essential.
Projects
None yet
2 participants