mirror of
https://github.com/projectcapsule/capsule.git
synced 2026-02-14 18:09:58 +00:00
feat(tenant): add dedicated tenantowner crd (#1764)
Signed-off-by: Oliver Bähler <oliverbaehler@hotmail.com>
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// Copyright 2020-2025 Project Capsule Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
//nolint:dupl
|
||||
package api
|
||||
|
||||
import (
|
||||
@@ -31,6 +30,15 @@ func (o OwnerListSpec) IsOwner(name string, groups []string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (o OwnerListSpec) ToStatusOwners() OwnerStatusListSpec {
|
||||
list := OwnerStatusListSpec{}
|
||||
for _, owner := range o {
|
||||
list = append(list, owner.CoreOwnerSpec)
|
||||
}
|
||||
|
||||
return list
|
||||
}
|
||||
|
||||
func (o OwnerListSpec) FindOwner(name string, kind OwnerKind) (owner OwnerSpec) {
|
||||
sort.Sort(ByKindAndName(o))
|
||||
i := sort.Search(len(o), func(i int) bool {
|
||||
|
||||
Reference in New Issue
Block a user