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

feat: 支持目录权限配置 #1579 #1602

Merged
merged 8 commits into from
Jan 2, 2024

Conversation

owenlxu
Copy link
Collaborator

@owenlxu owenlxu commented Dec 28, 2023

No description provided.

@owenlxu owenlxu requested a review from cnlkl December 28, 2023 07:04
@owenlxu owenlxu changed the title feat: 拉取一级目录时,结合权限校验 #1585 feat: 支持目录权限配置 #1579 Dec 28, 2023
@@ -188,46 +192,30 @@ open class PermissionServiceImpl constructor(
// check user admin permission
if (user.admin) return true
// check role project admin
if (checkProjectAdmin(request, user.roles)) return true
if (checkProjectAdmin(request)) return true
// check role project user
if (checkProjectUser(request, user.roles)) return true
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里只要是项目成员就不会再继续判断仓库管理员或是否有Node权限了

@@ -30,6 +30,7 @@
*/
dependencies {
implementation(project(":common:common-api"))
api(project(":common:common-query:query-api"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个是多余的依赖吗

}
} else {
if (it.includePattern.isNotEmpty()) {
excludePath.addAll(it.includePattern)
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里需要过滤用户有权限的路径,不加入到excludePath

@owenlxu owenlxu merged commit 0a6bbfd into TencentBlueKing:master Jan 2, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants