Skip to content

fix(FR-877): Enable project folder mount permissions editing for admins #3549

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

agatha197
Copy link
Contributor

@agatha197 agatha197 commented Apr 21, 2025

Resolves #3548 (FR-877)

Allow admins to change permission of group folders

This PR enables project admins to change the permission of group folders. Previously, only the owner of a folder could change its permission. Now, project admins can also change the permission of folders that belong to their project.

The changes include:

  • Adding the group field to the GraphQL query for both legacy and new vfolder APIs
  • Using the current project context to determine if the user is an admin of the project
  • Allowing permission changes when the folder belongs to the current project and the user is an admin
  • Using baiClient.is_admin instead of userRole === 'admin' for consistency

Specific setting for review

  1. make a new project folder with admin user.
  2. click the folder name to change the project mount permission.

Minimum requirements to check during review

  • If current project id is same with group id of project folder, you can see the mount permission selector in the folder explorer.
  • If current project id is not same with group id of project folder or current user role is not admin, you cannot see the mount permission selector in the folder explorer.

Checklist: (if applicable)

  • Documentation
  • Minium required manager version
  • Specific setting for review (eg., KB link, endpoint or how to setup)
  • Minimum requirements to check during review
  • Test case(s) to demonstrate the difference of before/after

@github-actions github-actions bot added area:lib Library and SDK related issue. size:S 10~30 LoC labels Apr 21, 2025
Copy link
Contributor Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • flow:merge-queue - adds this PR to the back of the merge queue
  • flow:hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has required the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

github-actions bot commented Apr 21, 2025

Coverage report for ./react

St.
Category Percentage Covered / Total
🔴 Statements 4.17% 409/9809
🔴 Branches
3.53% (-0% 🔻)
240/6792
🔴 Functions 2.54% 79/3114
🔴 Lines 4.11% 394/9593

Test suite run success

124 tests passing in 14 suites.

Report generated by 🧪jest coverage report action from b886fc8

@agatha197 agatha197 force-pushed the fix_FR-877_/fix-project-folder-mount-permission-issue branch from 6291917 to b886fc8 Compare April 22, 2025 02:01
@agatha197 agatha197 requested a review from ironAiken2 April 22, 2025 02:02
Copy link
Contributor

@ironAiken2 ironAiken2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@agatha197 agatha197 force-pushed the fix_FR-877_/fix-project-folder-mount-permission-issue branch from b886fc8 to ff747ee Compare April 29, 2025 05:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:lib Library and SDK related issue. size:S 10~30 LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inability to Change Project Folder Mount Permissions from List in Latest Version
2 participants