Support LDAP search by user tag

This commit is contained in:
Yang Luo
2023-05-12 13:03:43 +08:00
parent c33d537ac1
commit 96a3db21a1
4 changed files with 52 additions and 3 deletions

View File

@ -282,6 +282,10 @@ func CheckUserPermission(requestUserId, userId string, strict bool, lang string)
if userId != "" {
targetUser := GetUser(userId)
if targetUser == nil {
if strings.HasPrefix(requestUserId, "built-in/") {
return true, nil
}
return false, fmt.Errorf(i18n.Translate(lang, "general:The user: %s doesn't exist"), userId)
}