mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-26 04:05:40 +01:00
Add SearchDN error, mark field as required in UI
Signed-off-by: Alexis <60alexis@gmail.com>
This commit is contained in:
parent
b789674ada
commit
d6283ee913
@ -53,6 +53,9 @@ var ErrInvalidFilter = errors.New("invalid filter syntax")
|
||||
// ErrEmptyBaseDN ...
|
||||
var ErrEmptyBaseDN = errors.New("empty base dn")
|
||||
|
||||
// ErrEmptySearchDN ...
|
||||
var ErrEmptySearchDN = errors.New("empty search dn")
|
||||
|
||||
// Session - define a LDAP session
|
||||
type Session struct {
|
||||
basicCfg models.LdapConf
|
||||
@ -125,7 +128,7 @@ func TestConfig(ldapConfig models.LdapConf) (bool, error) {
|
||||
defer ts.Close()
|
||||
|
||||
if ts.basicCfg.SearchDn == "" {
|
||||
return false, ErrEmptyBaseDN
|
||||
return false, ErrEmptySearchDN
|
||||
}
|
||||
if err := ts.Bind(ts.basicCfg.SearchDn, ts.basicCfg.SearchPassword); err != nil {
|
||||
if goldap.IsErrorWithCode(err, goldap.LDAPResultInvalidCredentials) {
|
||||
|
@ -61,7 +61,7 @@
|
||||
<clr-control-error>{{'TOOLTIP.ITEM_REQUIRED' | translate}}</clr-control-error>
|
||||
</clr-input-container>
|
||||
<clr-input-container>
|
||||
<label for="ldapSearchDN" >{{'CONFIG.LDAP.SEARCH_DN' | translate}}
|
||||
<label for="ldapSearchDN" class="required">{{'CONFIG.LDAP.SEARCH_DN' | translate}}
|
||||
<clr-tooltip>
|
||||
<clr-icon clrTooltipTrigger shape="info-circle" size="24"></clr-icon>
|
||||
<clr-tooltip-content clrPosition="top-right" clrSize="lg" *clrIfOpen>
|
||||
|
Loading…
Reference in New Issue
Block a user