Skip to content

新建应用时权限赋予错误 #5181

@Lin-1997

Description

@Lin-1997
  • I have checked the discussions
  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Describe the bug
A用户新建一个应用,将应用负责人、应用管理员都仅设置为B用户。此时也为A用户赋予了默认namespace的编辑、发布权限,不应该给A用户任何权限的。

To Reproduce
Steps to reproduce the behavior:
1.新建一个应用,将应用负责人、应用管理员都仅设置为B用户

Expected behavior
A用户没有任何权限

Additional Details & Logs

//assign modify、release namespace role to user
rolePermissionService.assignRoleToUsers(
RoleUtils.buildNamespaceRoleName(appId, ConfigConsts.NAMESPACE_APPLICATION, RoleType.MODIFY_NAMESPACE),
Sets.newHashSet(operator), operator);
rolePermissionService.assignRoleToUsers(
RoleUtils.buildNamespaceRoleName(appId, ConfigConsts.NAMESPACE_APPLICATION, RoleType.RELEASE_NAMESPACE),
Sets.newHashSet(operator), operator);

应该赋权限给用户Sets.newHashSet(app.getOwnerName()),而不是Sets.newHashSet(operator)

  • Version 2.2.0
  • Error logs
  • Configuration
  • Platform and Operating System

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions