bug fixed
This commit is contained in:
@@ -110,7 +110,7 @@ func clusterRoleUsersHandler(req *restful.Request, resp *restful.Response) {
|
|||||||
|
|
||||||
for _, roleBinding := range roleBindings {
|
for _, roleBinding := range roleBindings {
|
||||||
for _, subject := range roleBinding.Subjects {
|
for _, subject := range roleBinding.Subjects {
|
||||||
if subject.Kind == v1.UserKind {
|
if subject.Kind == v1.UserKind && !strings.HasPrefix(subject.Name, "system") {
|
||||||
users = append(users, subject.Name)
|
users = append(users, subject.Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ type userRuleList struct {
|
|||||||
Rules map[string][]rule `json:"rules"`
|
Rules map[string][]rule `json:"rules"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO design all frontend-facing rules
|
// TODO stored in etcd, allow updates
|
||||||
var (
|
var (
|
||||||
clusterRoleRuleGroup = []rule{projectsManagement, userManagement, roleManagement, registryManagement,
|
clusterRoleRuleGroup = []rule{projectsManagement, userManagement, roleManagement, registryManagement,
|
||||||
volumeManagement, storageclassManagement, nodeManagement, appCatalogManagement, appManagement}
|
volumeManagement, storageclassManagement, nodeManagement, appCatalogManagement, appManagement}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ func GetClusterRoleBindings(name string) ([]v1.ClusterRoleBinding, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return roleBindingList.Items, nil
|
return items, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetRoleBindings(namespace string, name string) ([]v1.RoleBinding, error) {
|
func GetRoleBindings(namespace string, name string) ([]v1.RoleBinding, error) {
|
||||||
@@ -53,7 +53,7 @@ func GetRoleBindings(namespace string, name string) ([]v1.RoleBinding, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return roleBindingList.Items, nil
|
return items, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetClusterRole(name string) (*v1.ClusterRole, error) {
|
func GetClusterRole(name string) (*v1.ClusterRole, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user