2021-11-05 09:37:30 +00:00
|
|
|
package constants
|
|
|
|
|
2021-12-02 14:28:58 +00:00
|
|
|
const (
|
|
|
|
OCTop = "top"
|
|
|
|
OCDomain = "domain"
|
|
|
|
OCNSContainer = "nsContainer"
|
|
|
|
)
|
|
|
|
|
2021-11-05 09:37:30 +00:00
|
|
|
const (
|
|
|
|
OCGroup = "group"
|
|
|
|
OCGroupOfUniqueNames = "groupOfUniqueNames"
|
2022-06-02 16:48:07 +00:00
|
|
|
OCGroupOfNames = "groupOfNames"
|
2021-11-05 09:37:30 +00:00
|
|
|
OCAKGroup = "goauthentik.io/ldap/group"
|
|
|
|
OCAKVirtualGroup = "goauthentik.io/ldap/virtual-group"
|
2023-02-22 14:26:41 +00:00
|
|
|
OCPosixGroup = "posixGroup"
|
2021-11-05 09:37:30 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
OCUser = "user"
|
|
|
|
OCOrgPerson = "organizationalPerson"
|
|
|
|
OCInetOrgPerson = "inetOrgPerson"
|
|
|
|
OCAKUser = "goauthentik.io/ldap/user"
|
2023-02-22 14:26:41 +00:00
|
|
|
OCPosixAccount = "posixAccount"
|
2021-11-05 09:37:30 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
const (
|
|
|
|
OUUsers = "users"
|
|
|
|
OUGroups = "groups"
|
|
|
|
OUVirtualGroups = "virtual-groups"
|
|
|
|
)
|
2021-12-02 14:28:58 +00:00
|
|
|
|
|
|
|
func GetDomainOCs() map[string]bool {
|
|
|
|
return map[string]bool{
|
|
|
|
OCTop: true,
|
|
|
|
OCDomain: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func GetContainerOCs() map[string]bool {
|
|
|
|
return map[string]bool{
|
|
|
|
OCTop: true,
|
|
|
|
OCNSContainer: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func GetUserOCs() map[string]bool {
|
|
|
|
return map[string]bool{
|
|
|
|
OCUser: true,
|
|
|
|
OCOrgPerson: true,
|
|
|
|
OCInetOrgPerson: true,
|
|
|
|
OCAKUser: true,
|
2023-02-22 14:26:41 +00:00
|
|
|
OCPosixAccount: true,
|
2021-12-02 14:28:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func GetGroupOCs() map[string]bool {
|
|
|
|
return map[string]bool{
|
|
|
|
OCGroup: true,
|
|
|
|
OCGroupOfUniqueNames: true,
|
2022-06-02 16:48:07 +00:00
|
|
|
OCGroupOfNames: true,
|
2021-12-02 14:28:58 +00:00
|
|
|
OCAKGroup: true,
|
2023-02-22 14:26:41 +00:00
|
|
|
OCPosixGroup: true,
|
2021-12-02 14:28:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func GetVirtualGroupOCs() map[string]bool {
|
|
|
|
return map[string]bool{
|
|
|
|
OCGroup: true,
|
|
|
|
OCGroupOfUniqueNames: true,
|
2022-06-02 16:48:07 +00:00
|
|
|
OCGroupOfNames: true,
|
2021-12-02 14:28:58 +00:00
|
|
|
OCAKVirtualGroup: true,
|
|
|
|
}
|
|
|
|
}
|