多组用户权限控制 #5125
Replies: 2 comments
-
To control viewing permissions for different user groups in the admin panel, you'll need to implement a more granular access control system. Here's a streamlined approach:
Here's a code snippet to illustrate assigning group-based roles: @PreAuthorize(value = "@permissionValidator.hasAssignRolePermission(#appId)")
@PostMapping("/apps/{appId}/groups/{groupId}/namespaces/{namespaceName}/roles/{roleType}")
public ResponseEntity<Void> assignGroupNamespaceRoleToUser(@PathVariable String appId, @PathVariable String groupId, @PathVariable String namespaceName,
@PathVariable String roleType, @RequestBody String user) {
// Validation and role assignment logic here, including group ID considerations
return ResponseEntity.ok().build();
} This approach requires careful planning and testing to ensure security and functionality. For implementation details, refer to the Apollo project's Sources
|
Beta Was this translation helpful? Give feedback.
-
我想在管理端控制不同用户的查看权限,以免一个开发组的员工看到另一个project下的配置,不知道可以做到吗?我看到现有的“负责人”级别权限只能控制修改发布权限,但是他们依旧有读权限
Beta Was this translation helpful? Give feedback.
All reactions