feat: add posixAccount and posixGroup filter logic for more versatile usage in LDAP (#4014)

This commit is contained in:
Xiao Mao
2025-07-29 21:49:39 +08:00
committed by GitHub
parent 0ac69bde53
commit f3af2a26aa
3 changed files with 77 additions and 0 deletions

View File

@@ -70,6 +70,16 @@ func GetGroups(owner string) ([]*Group, error) {
return groups, nil
}
func GetGlobalGroups() ([]*Group, error) {
groups := []*Group{}
err := ormer.Engine.Desc("created_time").Find(&groups)
if err != nil {
return nil, err
}
return groups, nil
}
func GetPaginationGroups(owner string, offset, limit int, field, value, sortField, sortOrder string) ([]*Group, error) {
groups := []*Group{}
session := GetSession(owner, offset, limit, field, value, sortField, sortOrder)