Search in sources :

Example 1 with NamespaceRolesAssignedUsers

use of com.ctrip.framework.apollo.portal.entity.vo.NamespaceRolesAssignedUsers in project apollo by ctripcorp.

the class PermissionController method getNamespaceRoles.

@GetMapping("/apps/{appId}/namespaces/{namespaceName}/role_users")
public NamespaceRolesAssignedUsers getNamespaceRoles(@PathVariable String appId, @PathVariable String namespaceName) {
    NamespaceRolesAssignedUsers assignedUsers = new NamespaceRolesAssignedUsers();
    assignedUsers.setNamespaceName(namespaceName);
    assignedUsers.setAppId(appId);
    Set<UserInfo> releaseNamespaceUsers = rolePermissionService.queryUsersWithRole(RoleUtils.buildReleaseNamespaceRoleName(appId, namespaceName));
    assignedUsers.setReleaseRoleUsers(releaseNamespaceUsers);
    Set<UserInfo> modifyNamespaceUsers = rolePermissionService.queryUsersWithRole(RoleUtils.buildModifyNamespaceRoleName(appId, namespaceName));
    assignedUsers.setModifyRoleUsers(modifyNamespaceUsers);
    return assignedUsers;
}
Also used : NamespaceRolesAssignedUsers(com.ctrip.framework.apollo.portal.entity.vo.NamespaceRolesAssignedUsers) UserInfo(com.ctrip.framework.apollo.portal.entity.bo.UserInfo)

Aggregations

UserInfo (com.ctrip.framework.apollo.portal.entity.bo.UserInfo)1 NamespaceRolesAssignedUsers (com.ctrip.framework.apollo.portal.entity.vo.NamespaceRolesAssignedUsers)1