mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-16 12:05:30 +09:00
1 parent
ddcc8d998c
commit
3d5d61778a
11 files changed
+63
-51
No files matched your search
@@ -5,7 +5,7 @@ Gogs - Go Git Service [
|
||||
|
||||
##### Current version: 0.7.40 Beta
|
||||
##### Current version: 0.7.41 Beta
|
||||
|
||||
| Web | UI | Preview |
|
||||
|:-------------:|:-------:|:-------:|
|
||||
|
||||
@@ -272,6 +272,7 @@ new_password = New Password
|
||||
retype_new_password = Retype New Password
|
||||
password_incorrect = Current password is not correct.
|
||||
change_password_success = Your password was successfully changed. You can now sign using this new password.
|
||||
password_change_disabled = Non-local type users are not allowed to change their password.
|
||||
|
||||
emails = Email Addresses
|
||||
manage_emails = Manage email addresses
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
"github.com/gogits/gogs/modules/setting"
|
||||
)
|
||||
|
||||
const APP_VER = "0.7.40.1210 Beta"
|
||||
const APP_VER = "0.7.41.1210 Beta"
|
||||
|
||||
func init() {
|
||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||
|
||||
+32
-32
@@ -26,12 +26,12 @@ type LoginType int
|
||||
|
||||
// Note: new type must be added at the end of list to maintain compatibility.
|
||||
const (
|
||||
NOTYPE LoginType = iota
|
||||
PLAIN
|
||||
LDAP
|
||||
SMTP
|
||||
PAM
|
||||
DLDAP
|
||||
LOGIN_NOTYPE LoginType = iota
|
||||
LOGIN_PLAIN
|
||||
LOGIN_LDAP
|
||||
LOGIN_SMTP
|
||||
LOGIN_PAM
|
||||
LOGIN_DLDAP
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -40,10 +40,10 @@ var (
|
||||
)
|
||||
|
||||
var LoginNames = map[LoginType]string{
|
||||
LDAP: "LDAP (via BindDN)",
|
||||
DLDAP: "LDAP (simple auth)",
|
||||
SMTP: "SMTP",
|
||||
PAM: "PAM",
|
||||
LOGIN_LDAP: "LDAP (via BindDN)",
|
||||
LOGIN_DLDAP: "LDAP (simple auth)",
|
||||
LOGIN_SMTP: "SMTP",
|
||||
LOGIN_PAM: "PAM",
|
||||
}
|
||||
|
||||
// Ensure structs implemented interface.
|
||||
@@ -108,11 +108,11 @@ func (source *LoginSource) BeforeSet(colName string, val xorm.Cell) {
|
||||
switch colName {
|
||||
case "type":
|
||||
switch LoginType((*val).(int64)) {
|
||||
case LDAP, DLDAP:
|
||||
case LOGIN_LDAP, LOGIN_DLDAP:
|
||||
source.Cfg = new(LDAPConfig)
|
||||
case SMTP:
|
||||
case LOGIN_SMTP:
|
||||
source.Cfg = new(SMTPConfig)
|
||||
case PAM:
|
||||
case LOGIN_PAM:
|
||||
source.Cfg = new(PAMConfig)
|
||||
default:
|
||||
panic("unrecognized login source type: " + com.ToStr(*val))
|
||||
@@ -125,26 +125,26 @@ func (source *LoginSource) TypeName() string {
|
||||
}
|
||||
|
||||
func (source *LoginSource) IsLDAP() bool {
|
||||
return source.Type == LDAP
|
||||
return source.Type == LOGIN_LDAP
|
||||
}
|
||||
|
||||
func (source *LoginSource) IsDLDAP() bool {
|
||||
return source.Type == DLDAP
|
||||
return source.Type == LOGIN_DLDAP
|
||||
}
|
||||
|
||||
func (source *LoginSource) IsSMTP() bool {
|
||||
return source.Type == SMTP
|
||||
return source.Type == LOGIN_SMTP
|
||||
}
|
||||
|
||||
func (source *LoginSource) IsPAM() bool {
|
||||
return source.Type == PAM
|
||||
return source.Type == LOGIN_PAM
|
||||
}
|
||||
|
||||
func (source *LoginSource) UseTLS() bool {
|
||||
switch source.Type {
|
||||
case LDAP, DLDAP:
|
||||
case LOGIN_LDAP, LOGIN_DLDAP:
|
||||
return source.LDAP().UseSSL
|
||||
case SMTP:
|
||||
case LOGIN_SMTP:
|
||||
return source.SMTP().TLS
|
||||
}
|
||||
|
||||
@@ -153,9 +153,9 @@ func (source *LoginSource) UseTLS() bool {
|
||||
|
||||
func (source *LoginSource) SkipVerify() bool {
|
||||
switch source.Type {
|
||||
case LDAP, DLDAP:
|
||||
case LOGIN_LDAP, LOGIN_DLDAP:
|
||||
return source.LDAP().SkipVerify
|
||||
case SMTP:
|
||||
case LOGIN_SMTP:
|
||||
return source.SMTP().SkipVerify
|
||||
}
|
||||
|
||||
@@ -230,7 +230,7 @@ func DeleteSource(source *LoginSource) error {
|
||||
// It returns the same LoginUserPlain semantic.
|
||||
func LoginUserLDAPSource(u *User, loginName, passwd string, source *LoginSource, autoRegister bool) (*User, error) {
|
||||
cfg := source.Cfg.(*LDAPConfig)
|
||||
directBind := (source.Type == DLDAP)
|
||||
directBind := (source.Type == LOGIN_DLDAP)
|
||||
name, fn, sn, mail, admin, logged := cfg.SearchEntry(loginName, passwd, directBind)
|
||||
if !logged {
|
||||
// User not in LDAP, do nothing
|
||||
@@ -350,7 +350,7 @@ func SMTPAuth(a smtp.Auth, cfg *SMTPConfig) error {
|
||||
// Query if name/passwd can login against the LDAP directory pool
|
||||
// Create a local user if success
|
||||
// Return the same LoginUserPlain semantic
|
||||
func LoginUserSMTPSource(u *User, name, passwd string, sourceId int64, cfg *SMTPConfig, autoRegister bool) (*User, error) {
|
||||
func LoginUserSMTPSource(u *User, name, passwd string, sourceID int64, cfg *SMTPConfig, autoRegister bool) (*User, error) {
|
||||
// Verify allowed domains.
|
||||
if len(cfg.AllowedDomains) > 0 {
|
||||
idx := strings.Index(name, "@")
|
||||
@@ -390,8 +390,8 @@ func LoginUserSMTPSource(u *User, name, passwd string, sourceId int64, cfg *SMTP
|
||||
u = &User{
|
||||
LowerName: strings.ToLower(loginName),
|
||||
Name: strings.ToLower(loginName),
|
||||
LoginType: SMTP,
|
||||
LoginSource: sourceId,
|
||||
LoginType: LOGIN_SMTP,
|
||||
LoginSource: sourceID,
|
||||
LoginName: name,
|
||||
IsActive: true,
|
||||
Passwd: passwd,
|
||||
@@ -411,7 +411,7 @@ func LoginUserSMTPSource(u *User, name, passwd string, sourceId int64, cfg *SMTP
|
||||
// Query if name/passwd can login against PAM
|
||||
// Create a local user if success
|
||||
// Return the same LoginUserPlain semantic
|
||||
func LoginUserPAMSource(u *User, name, passwd string, sourceId int64, cfg *PAMConfig, autoRegister bool) (*User, error) {
|
||||
func LoginUserPAMSource(u *User, name, passwd string, sourceID int64, cfg *PAMConfig, autoRegister bool) (*User, error) {
|
||||
if err := pam.PAMAuth(cfg.ServiceName, name, passwd); err != nil {
|
||||
if strings.Contains(err.Error(), "Authentication failure") {
|
||||
return nil, ErrUserNotExist{0, name}
|
||||
@@ -427,8 +427,8 @@ func LoginUserPAMSource(u *User, name, passwd string, sourceId int64, cfg *PAMCo
|
||||
u = &User{
|
||||
LowerName: strings.ToLower(name),
|
||||
Name: name,
|
||||
LoginType: PAM,
|
||||
LoginSource: sourceId,
|
||||
LoginType: LOGIN_PAM,
|
||||
LoginSource: sourceID,
|
||||
LoginName: name,
|
||||
IsActive: true,
|
||||
Passwd: passwd,
|
||||
@@ -443,11 +443,11 @@ func ExternalUserLogin(u *User, name, passwd string, source *LoginSource, autoRe
|
||||
}
|
||||
|
||||
switch source.Type {
|
||||
case LDAP, DLDAP:
|
||||
case LOGIN_LDAP, LOGIN_DLDAP:
|
||||
return LoginUserLDAPSource(u, name, passwd, source, autoRegister)
|
||||
case SMTP:
|
||||
case LOGIN_SMTP:
|
||||
return LoginUserSMTPSource(u, name, passwd, source.ID, source.Cfg.(*SMTPConfig), autoRegister)
|
||||
case PAM:
|
||||
case LOGIN_PAM:
|
||||
return LoginUserPAMSource(u, name, passwd, source.ID, source.Cfg.(*PAMConfig), autoRegister)
|
||||
}
|
||||
|
||||
@@ -470,7 +470,7 @@ func UserSignIn(uname, passwd string) (*User, error) {
|
||||
|
||||
if userExists {
|
||||
switch u.LoginType {
|
||||
case NOTYPE, PLAIN:
|
||||
case LOGIN_NOTYPE, LOGIN_PLAIN:
|
||||
if u.ValidatePassword(passwd) {
|
||||
return u, nil
|
||||
}
|
||||
|
||||
@@ -118,6 +118,11 @@ func (u *User) AfterSet(colName string, _ xorm.Cell) {
|
||||
}
|
||||
}
|
||||
|
||||
// returns true if user login type is LOGIN_PLAIN.
|
||||
func (u *User) IsLocal() bool {
|
||||
return u.LoginType <= LOGIN_PLAIN
|
||||
}
|
||||
|
||||
// HasForkedRepo checks if user has already forked a repository with given ID.
|
||||
func (u *User) HasForkedRepo(repoID int64) bool {
|
||||
_, has := HasForkedRepo(u.Id, repoID)
|
||||
|
||||
@@ -4364,7 +4364,7 @@ func confLocaleLocale_deDeIni() (*asset, error) {
|
||||
return a, nil
|
||||
}
|
||||
|
||||
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x7d\xeb\x72\xdc\x56\xee\xe7\x77\x3e\x05\xe3\x29\x97\xed\x2a\xb9\x5d\x99\xfc\xf7\x52\xa9\x38\x59\x59\x8a\x2f\xf3\xb7\x2c\x8d\xa5\x4c\x76\x36\xe5\x62\xd8\x4d\x76\x37\xc7\xdd\x64\x0f\xc9\x96\xac\x4c\xcd\x1b\xec\x03\xec\xf3\xed\x93\x2c\xf0\x03\x70\x2e\x24\x5b\xb2\x33\x53\xeb\x0f\x16\xfb\x1c\x9c\x3b\x0e\x0e\x80\x03\xe0\xe4\xbb\x5d\x56\x94\xdd\x22\x7d\x9e\x1e\xa7\xbb\xbc\xaa\x37\x65\xd7\xa5\x5d\xb9\x59\x3e\x5d\x37\x5d\x5f\x16\xe9\xab\xaa\xa7\xdf\xed\x75\xb5\x28\x93\x64\xdd\x6c\x4b\x02\x7d\x4d\x7f\x92\x22\xef\xd6\xf3\x26\x6f\x0b\x4a\x38\xb5\xef\xa4\xfc\xb4\xdb\x34\x2d\x03\xfd\x28\x5f\xc9\xba\xdc\xec\xb8\x0c\xfd\x49\xba\x6a\x55\x67\x55\x4d\x3f\x2f\xe9\x2b\x7d\x53\x4b\x4a\xb3\xef\x2d\xe9\x7c\xdf\x4b\xda\x7e\x67\x49\x3f\xed\x92\xb6\x5c\x55\xd4\x9b\x96\x92\xde\xeb\x67\x72\x53\xce\xbb\xaa\xe7\x96\x7e\x96\xaf\xe4\xba\x6c\xbb\xaa\xe1\xda\xff\x22\x5f\xc9\x2e\x5f\x31\xc0\x05\xfd\x49\xfa\x72\xbb\xdb\xe4\x28\x70\xa5\x9f\xc9\x26\xaf\x57\x7b\x81\x79\xab\x9f\xc9\xa2\x2d\x29\x2b\xab\xcb\x1b\x4a\x3d\xc1\x8f\xd9\x6c\x96\xec\x69\x12\xb2\x5d\xdb\x2c\xab\x4d\x99\xe5\x75\x91\x6d\x65\x98\x3f\x51\x7a\xaa\xe9\x29\xa5\xa7\x9c\x8e\x21\x94\x05\x0d\x35\xcb\x3b\x1d\x07\xcd\x25\x8d\x3c\xef\x12\x54\x55\xe7\x5b\x2b\xcd\x9f\x49\xb9\xcd\xab\x0d\xcf\x1a\xff\xa5\x7e\x77\xdd\x4d\x83\xa9\xbd\xd0\x4f\x9a\x83\xac\xbf\xdd\x95\x98\x82\xa7\x57\xf4\x95\x2c\xf2\x5d\xbf\x58\xe7\xdc\x4d\xf9\x4a\x08\x68\xd7\xd0\x5c\x34\xed\x2d\xe0\xec\x47\xd2\xb4\xab\xbc\xae\x7e\xcb\x7b\x99\x9f\xf3\xe0\x67\xb2\xad\xda\xb6\xe1\xa9\x3d\xc3\x47\x42\x23\xcf\xb8\x1e\x4a\x79\x47\x93\x10\xd4\xc2\x39\xdb\x6a\xd5\xca\x2c\x72\xe6\x19\x7e\x71\x2d\x92\xa7\x35\x49\x96\xab\x6d\xd9\xb4\x1f\x35\xf5\x25\x7f\x0e\xaa\xa4\xce\x69\x6e\xdc\xaf\xbc\xa6\xf5\xd0\xdc\x33\xfc\x88\x00\xba\x24\x2f\xb6\x34\xc3\xbb\xbc\x2e\x79\xea\x8e\xf9\x17\xcd\x17\xfd\x4a\xf2\xc5\xa2\xd9\xd7\x7d\xd6\x95\x7d\x5f\xd5\x2b\x5e\x83\x63\x49\x4a\x2f\x35\x29\x09\xf2\x5c\xda\x6d\xb3\x77\xab\x4c\xe9\x7f\xa5\x9f\xe9\x85\xfc\x94\xbc\xa0\x10\x32\x5d\x49\x1e\x49\x97\x2d\xcb\xb2\x90\xb1\x74\xe9\x4b\xfa\x4e\x76\xfb\xcd\x86\x66\xf3\xef\xfb\xb2\xeb\xb9\xd0\x05\xfd\xa6\xf1\xcb\xef\xa4\xea\x3a\xfa\xa0\xe4\x37\xf8\x48\x68\x49\xeb\x05\x06\x73\x82\x8f\x24\xf9\xa5\x2b\xf3\x76\xb1\xfe\x90\xc8\x5f\xf4\x95\x3f\x18\x25\x0f\x2d\x36\xe3\x97\xe2\x96\xb4\x60\x0d\x24\x8b\xa6\xe0\x1f\x27\xf4\x87\xaa\xae\xea\xae\xcf\x37\x9b\x0f\x89\x7e\x30\x98\x7c\xc9\x02\xf4\x55\x8f\x59\xd0\xc4\xf4\xb2\x2f\x77\x1d\xaf\x60\xfa\xb2\x6a\xbb\xfe\x69\x5f\x11\x0e\xbf\xdf\xd7\x49\xd1\x2c\x3e\xd2\xee\xe0\x9d\x8e\x96\xdf\x2c\x53\x9a\xac\x47\xb4\x3f\xda\x7d\x5d\xd3\xf4\xa4\xaf\x1a\x9a\x32\x6a\xa6\xa2\xf6\x4f\x01\x7d\x94\xee\x36\x65\xde\x11\x48\x99\x17\xe9\x77\x79\xda\xe7\xed\xaa\xec\x9f\x3f\xc8\xe6\xb4\x2b\x3f\x3e\x48\xd7\x6d\xb9\x7c\xfe\xe0\x61\xf7\xe0\xfb\x57\x7b\x2a\xb6\xa9\xea\xb2\xfb\xee\x59\xfe\x7d\xba\xc8\x29\x87\xa6\xf1\x36\x9d\x97\x4b\xde\x84\xd4\x56\x4a\xd8\x5f\xaf\x78\x03\xde\xf6\x6b\x6e\x90\x30\x81\x3e\xba\x94\x29\xc0\x57\x09\x2f\x00\x51\x88\xac\x98\x1b\xb5\x43\x87\x90\xdc\xd2\x02\x9c\xdd\x5e\xfe\xf9\xed\x51\x7a\x41\x24\x6f\xd5\x96\xf8\xa6\xff\xa8\xc4\x37\x29\x8d\xf6\xaa\x3a\x7d\x31\x4b\xa8\xac\x4d\xc8\x69\xde\xe7\x73\xee\xbb\x5b\x7d\xce\x94\xcd\xe9\xf2\xb0\x45\x99\x88\x82\x60\x76\x7d\xb4\x2c\x53\x1b\x9c\xea\x50\xaa\xe0\xea\x78\xc7\xa4\x81\xd2\xdd\xcc\x5e\xc8\x9c\x51\x55\xe9\x9b\x77\xef\xce\x4f\x5f\xa4\x65\xbd\xa2\x99\x49\x6f\xaa\x7e\x9d\xee\xfb\xe5\x7f\xcf\x56\x65\x5d\xb6\xf9\x26\x5b\x54\x3c\x29\x2d\x21\x6c\x4a\xb3\x24\x43\x9c\x25\x5d\xb7\x21\xca\x05\x2c\xb8\xbc\x7c\x9b\x9e\x31\x26\xec\xf2\x7e\x8d\x8e\xf4\xeb\xa4\xfb\xfb\x86\x27\xca\x35\x78\xb5\x2e\x53\x6c\x06\x00\x35\xcb\xe1\xbc\xa4\x85\xf6\x75\x96\x94\x6d\x9b\x11\x61\xed\x6f\x79\x9a\xb5\xce\x43\xd0\x52\x1d\x61\x7b\xdd\xf4\xb4\x8c\x29\xca\x49\x15\x55\x7d\x9d\x6f\xaa\x82\x26\xdb\x4f\x48\x5c\x16\x89\x45\x43\xeb\xc6\xa5\x09\x33\x9b\x1b\x0c\x35\x5f\xd0\xb9\xd0\xa5\x0f\x66\x0f\x40\x88\x1f\x3c\x7d\x30\x4b\xea\x26\x13\x2a\xc1\x24\xbb\xa8\xba\x7c\x4e\xe4\x5b\x8e\x93\xd6\xa8\xe1\x5f\x19\x7f\xa4\x2b\x0a\x91\x46\x10\x3c\xb7\x7c\x44\xe1\x64\x60\xe4\xca\x89\x8e\x83\xd8\x28\x99\x09\xc7\x6e\x34\xc9\xad\xaf\x90\x25\x97\x30\x1a\x73\x62\x0b\x66\xd8\x75\xbc\xdb\x6d\xaa\x85\x34\xfd\x4a\xf2\x3c\xa2\xf1\x81\xad\x93\x12\xc2\x01\x51\x2c\x2f\x40\x17\xea\x35\x93\xad\x34\xa2\xff\x28\xbf\x2e\x69\xe7\xac\xf7\x2b\x39\xb4\x36\xcd\xbe\xf8\x0a\x04\xc5\x56\xce\xd3\x93\xf4\x7d\x43\x1d\x06\x76\x38\x00\xdf\xc4\x31\x11\x06\xe6\x11\xda\x72\xdb\xf4\x3c\x71\x5a\xac\xa2\xe5\xb9\xa9\x28\x93\x46\xda\xe5\xd7\x44\x16\xfb\x46\xb6\x64\x41\x5b\x6e\xc1\x15\x13\x05\xdb\xd3\x41\x2f\xdb\x82\xe8\x88\x6c\x0d\x4b\x8b\x71\x10\x50\xdb\x3d\xed\xa6\x35\x55\xc6\x13\xcf\x8c\x0a\x55\x39\xd5\x4f\x0c\x89\xea\xc1\x2e\xa7\x9d\xdb\xd0\xa1\xca\x0b\x7d\x8a\x0f\xfd\x1d\xd6\x4f\xbd\xca\x97\x4b\xea\x55\x47\xbb\xe2\x75\xba\xd8\x34\xb4\xa5\x7e\x7a\xff\xb6\xe3\x0d\xb3\xce\x76\x4d\x0b\x06\x85\xb2\x2e\xe8\xd3\xa5\x05\x13\xcd\x10\xf5\x7e\x3b\xa7\x5f\x37\xeb\x8a\x08\x35\xa6\x9d\x4b\x30\xf3\x44\xa9\xd4\xc4\xbe\xaLine truncated
|
||||
var _confLocaleLocale_enUsIni = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xbc\x7d\xeb\x92\xdc\x46\xae\xe6\x7f\x3e\x05\xad\x09\x85\xac\x88\x56\x39\x3c\x3e\x7b\x09\x87\x65\xaf\x2e\xd6\xe5\x1c\xb5\xba\x8f\xba\x3d\xb3\xb3\x0e\x45\x99\x5d\x64\x57\xf3\xa8\x8a\xac\x21\x59\x6a\xf5\x4c\xcc\x1b\xec\x03\xec\xf3\xed\x93\x2c\xf0\x01\xc8\x44\x92\xac\x6e\xc9\x67\x62\xf5\x43\xcd\xca\x44\xde\x91\x48\x00\x09\x20\x8b\xdd\x6e\x59\x56\xfd\x2a\x7f\x9c\x3f\xc9\x77\x45\xdd\x6c\xaa\xbe\xcf\xfb\x6a\x73\xf9\xe8\xaa\xed\x87\xaa\xcc\x5f\xd6\x03\xfd\xee\x3e\xd6\xab\x2a\xcb\xae\xda\x6d\x45\xa0\xaf\xe8\x4f\x56\x16\xfd\xd5\x45\x5b\x74\x25\x25\x3c\xb7\xef\xac\xfa\xb4\xdb\xb4\x1d\x03\xfd\x2c\x5f\xd9\x55\xb5\xd9\x71\x19\xfa\x93\xf5\xf5\xba\x59\xd6\x0d\xfd\x3c\xa3\xaf\xfc\x75\x23\x29\xed\x7e\xb0\xa4\x93\xfd\x20\x69\xfb\x9d\x25\xfd\xb2\xcb\xba\x6a\x5d\x53\x6f\x3a\x4a\x7a\xa7\x9f\xd9\x75\x75\xd1\xd7\x03\xb7\xf4\x67\xf9\xca\x3e\x56\x5d\x5f\xb7\x5c\xfb\x9f\xe4\x2b\xdb\x15\x6b\x06\x38\xa5\x3f\xd9\x50\x6d\x77\x9b\x02\x05\xce\xf5\x33\xdb\x14\xcd\x7a\x2f\x30\x6f\xf4\x33\x5b\x75\x15\x65\x2d\x9b\xea\x9a\x52\x9f\xe1\xc7\x62\xb1\xc8\xf6\x34\x09\xcb\x5d\xd7\x5e\xd6\x9b\x6a\x59\x34\xe5\x72\x2b\xc3\xfc\x85\xd2\x73\x4d\xcf\x29\x3d\xe7\x74\x0c\xa1\x2a\x69\xa8\xcb\xa2\xd7\x71\xd0\x5c\xd2\xc8\x8b\x3e\x43\x55\x4d\xb1\xb5\xd2\xfc\x99\x55\xdb\xa2\xde\xf0\xac\xf1\x5f\xea\x77\xdf\x5f\xb7\x98\xda\x53\xfd\xa4\x39\x58\x0e\x37\xbb\x0a\x53\xf0\xe8\x9c\xbe\xb2\x55\xb1\x1b\x56\x57\x05\x77\x53\xbe\x32\x02\xda\xb5\x34\x17\x6d\x77\x03\x38\xfb\x91\xb5\xdd\xba\x68\xea\xbf\x15\x83\xcc\xcf\x89\xfb\x99\x6d\xeb\xae\x6b\x79\x6a\x8f\xf1\x91\xd1\xc8\x97\x5c\x0f\xa5\xbc\xa5\x49\x70\xb5\x70\xce\xb6\x5e\x77\x32\x8b\x9c\x79\x8c\x5f\x5c\x8b\xe4\x69\x4d\x92\x15\x6a\xbb\x6c\xbb\x0f\x9a\xfa\x82\x3f\x47\x55\x52\xe7\x34\x37\xed\x57\xd1\xd0\x7a\x68\xee\x31\x7e\x24\x00\x7d\x56\x94\x5b\x9a\xe1\x5d\xd1\x54\x3c\x75\x4f\xf8\x17\xcd\x17\xfd\xca\x8a\xd5\xaa\xdd\x37\xc3\xb2\xaf\x86\xa1\x6e\xd6\xbc\x06\x4f\x24\x29\x3f\xd3\xa4\xcc\xe5\x85\xb4\x9b\x76\x1f\x56\x99\xd2\xff\x42\x3f\xf3\x53\xf9\x29\x79\xae\x10\x32\x43\x49\x1e\x49\xbf\xbc\xac\xaa\x52\xc6\xd2\xe7\x2f\xe8\x3b\xdb\xed\x37\x1b\x9a\xcd\xbf\xee\xab\x7e\xe0\x42\xa7\xf4\x9b\xc6\x2f\xbf\xb3\xba\xef\xe9\x83\x92\x5f\xe3\x23\xa3\x25\x6d\x56\x18\xcc\x33\x7c\x64\xd9\xaf\x7d\x55\x74\xab\xab\xf7\x99\xfc\x45\x5f\xf9\x83\x51\xf2\xd0\x62\x33\x7e\x29\x6e\x49\x0b\xd6\x40\xb6\x6a\x4b\xfe\xf1\x8c\xfe\x50\xd5\x75\xd3\x0f\xc5\x66\xf3\x3e\xd3\x0f\x06\x93\x2f\x59\x80\xa1\x1e\x30\x0b\x9a\x98\x9f\x0d\xd5\xae\xe7\x15\xcc\x5f\xd4\x5d\x3f\x3c\x1a\x6a\xc2\xe1\x77\xfb\x26\x2b\xdb\xd5\x07\xda\x1d\xbc\xd3\xd1\xf2\xeb\xcb\x9c\x26\xeb\x01\xed\x8f\x6e\xdf\x34\x34\x3d\xf9\xcb\x96\xa6\x8c\x9a\xa9\xa9\xfd\xe7\x80\x3e\xca\x77\x9b\xaa\xe8\x09\xa4\x2a\xca\xfc\x87\x22\x1f\x8a\x6e\x5d\x0d\x8f\xef\x2d\x2f\x68\x57\x7e\xb8\x97\x5f\x75\xd5\xe5\xe3\x7b\xf7\xfb\x7b\x3f\xbe\xdc\x53\xb1\x4d\xdd\x54\xfd\x0f\xdf\x14\x3f\xe6\xab\x82\x72\x68\x1a\x6f\xf2\x8b\xea\x92\x37\x21\xb5\x95\x13\xf6\x37\x6b\xde\x80\x37\xc3\x15\x37\x48\x98\x40\x1f\x7d\xce\x14\xe0\xab\x8c\x17\x80\x28\xc4\xb2\xbc\x30\x6a\x87\x0e\x21\xb9\xa3\x05\x38\xbe\x39\xfb\xf7\x37\x47\xf9\x29\x91\xbc\x75\x57\xe1\x9b\xfe\xa3\x12\xdf\xe5\x34\xda\xf3\xfa\xf9\xd3\x45\x46\x65\x6d\x42\x9e\x17\x43\x71\xc1\x7d\x0f\xab\xcf\x99\xb2\x39\x43\x1e\xb6\x28\x13\x51\x10\xcc\x7e\x48\x96\x65\x6e\x83\x53\x1d\x4a\x15\x42\x1d\x6f\x99\x34\x50\x7a\x98\xd9\x53\x99\x33\xaa\x2a\x7f\xfd\xf6\xed\xc9\xf3\xa7\x79\xd5\xac\x69\x66\xf2\xeb\x7a\xb8\xca\xf7\xc3\xe5\x7f\x5f\xae\xab\xa6\xea\x8a\xcd\x72\x55\xf3\xa4\x74\x84\xb0\x39\xcd\x92\x0c\x71\x91\xf5\xfd\x86\x28\x17\xb0\xe0\xec\xec\x4d\x7e\xcc\x98\xb0\x2b\x86\x2b\x74\x64\xb8\xca\xfa\xbf\x6e\x78\xa2\x42\x83\xe7\x57\x55\x8e\xcd\x00\xa0\xf6\x72\x3c\x2f\x79\xa9\x7d\x5d\x64\x55\xd7\x2d\x89\xb0\x0e\x37\x3c\xcd\x5a\xe7\x21\x68\xa9\x8e\xb0\xbd\x69\x07\x5a\xc6\x1c\xe5\xa4\x8a\xba\xf9\x58\x6c\xea\x92\x26\x3b\x4e\x48\x5a\x16\x89\x65\x4b\xeb\xc6\xa5\x09\x33\xdb\x6b\x0c\xb5\x58\xd1\xb9\xd0\xe7\xf7\x16\xf7\x40\x88\xef\x3d\xba\xb7\xc8\x9a\x76\x29\x54\x82\x49\x76\x59\xf7\xc5\x05\x91\x6f\x39\x4e\x3a\xa3\x86\x7f\x61\xfc\x91\xae\x28\x44\x9e\x40\xf0\xdc\xf2\x11\x85\x93\x81\x91\xab\x20\x3a\x0e\x62\xa3\x64\xc6\x8f\xdd\x68\x52\x58\x5f\x21\x4b\x21\x61\x32\xe6\xcc\x16\xcc\xb0\xeb\xc9\x6e\xb7\xa9\x57\xd2\xf4\x4b\xc9\x8b\x88\xc6\x07\xb6\x4e\x8a\x87\x03\xa2\x58\x9e\x43\x17\xea\x35\x93\xad\x3c\xa1\xff\x28\x7f\x55\xd1\xce\xb9\xda\xaf\xe5\xd0\xda\xb4\xfb\xf2\x2b\x10\x14\x5b\xb9\x48\x4f\xf2\x77\x2d\x75\x18\xd8\x11\x00\x62\x13\x4f\x88\x30\x30\x8f\xd0\x55\xdb\x76\xe0\x89\xd3\x62\x35\x2d\xcf\x75\x4d\x99\x34\xd2\xbe\xf8\x48\x64\x71\x68\x65\x4b\x96\xb4\xe5\x56\x5c\x31\x51\xb0\x3d\x1d\xf4\xb2\x2d\x88\x8e\xc8\xd6\xb0\xb4\x14\x07\x01\xb5\xdd\xd3\x6e\xba\xa2\xca\x78\xe2\x99\x51\xa1\x2a\xe7\xfa\x89\x21\x51\x3d\xd8\xe5\xb4\x73\x5b\x3a\x54\x79\xa1\x9f\xe3\x43\x7f\xfb\xfa\xa9\x57\xc5\xe5\x25\xf5\xaa\xa7\x5d\xf1\x2a\x5f\x6d\x5a\xda\x52\xbf\xbc\x7b\xd3\xf3\x86\xb9\x5a\xee\xda\x0e\x0c\x0a\x65\x9d\xd2\x67\x48\x73\x13\xcd\x10\xcd\x7e\x7b\x41\xbf\xae\xaf\x6a\x22\xd4\x98\x7Line truncated
|
||||
|
||||
func confLocaleLocale_enUsIniBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -4379,7 +4379,7 @@ func confLocaleLocale_enUsIni() (*asset, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 47920, mode: os.FileMode(420), modTime: time.Unix(1449769435, 0)}
|
||||
info := bindataFileInfo{name: "conf/locale/locale_en-US.ini", size: 48011, mode: os.FileMode(420), modTime: time.Unix(1449791468, 0)}
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
return a, nil
|
||||
}
|
||||
|
||||
+12
-12
@@ -45,10 +45,10 @@ type AuthSource struct {
|
||||
}
|
||||
|
||||
var authSources = []AuthSource{
|
||||
{models.LoginNames[models.LDAP], models.LDAP},
|
||||
{models.LoginNames[models.DLDAP], models.DLDAP},
|
||||
{models.LoginNames[models.SMTP], models.SMTP},
|
||||
{models.LoginNames[models.PAM], models.PAM},
|
||||
{models.LoginNames[models.LOGIN_LDAP], models.LOGIN_LDAP},
|
||||
{models.LoginNames[models.LOGIN_DLDAP], models.LOGIN_DLDAP},
|
||||
{models.LoginNames[models.LOGIN_SMTP], models.LOGIN_SMTP},
|
||||
{models.LoginNames[models.LOGIN_PAM], models.LOGIN_PAM},
|
||||
}
|
||||
|
||||
func NewAuthSource(ctx *middleware.Context) {
|
||||
@@ -56,8 +56,8 @@ func NewAuthSource(ctx *middleware.Context) {
|
||||
ctx.Data["PageIsAdmin"] = true
|
||||
ctx.Data["PageIsAdminAuthentications"] = true
|
||||
|
||||
ctx.Data["type"] = models.LDAP
|
||||
ctx.Data["CurTypeName"] = models.LoginNames[models.LDAP]
|
||||
ctx.Data["type"] = models.LOGIN_LDAP
|
||||
ctx.Data["CurTypeName"] = models.LoginNames[models.LOGIN_LDAP]
|
||||
ctx.Data["smtp_auth"] = "PLAIN"
|
||||
ctx.Data["is_active"] = true
|
||||
ctx.Data["AuthSources"] = authSources
|
||||
@@ -115,11 +115,11 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
|
||||
|
||||
var config core.Conversion
|
||||
switch models.LoginType(form.Type) {
|
||||
case models.LDAP, models.DLDAP:
|
||||
case models.LOGIN_LDAP, models.LOGIN_DLDAP:
|
||||
config = parseLDAPConfig(form)
|
||||
case models.SMTP:
|
||||
case models.LOGIN_SMTP:
|
||||
config = parseSMTPConfig(form)
|
||||
case models.PAM:
|
||||
case models.LOGIN_PAM:
|
||||
config = &models.PAMConfig{
|
||||
ServiceName: form.PAMServiceName,
|
||||
}
|
||||
@@ -181,11 +181,11 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
|
||||
|
||||
var config core.Conversion
|
||||
switch models.LoginType(form.Type) {
|
||||
case models.LDAP, models.DLDAP:
|
||||
case models.LOGIN_LDAP, models.LOGIN_DLDAP:
|
||||
config = parseLDAPConfig(form)
|
||||
case models.SMTP:
|
||||
case models.LOGIN_SMTP:
|
||||
config = parseSMTPConfig(form)
|
||||
case models.PAM:
|
||||
case models.LOGIN_PAM:
|
||||
config = &models.PAMConfig{
|
||||
ServiceName: form.PAMServiceName,
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ func NewUserPost(ctx *middleware.Context, form auth.AdminCrateUserForm) {
|
||||
Email: form.Email,
|
||||
Passwd: form.Password,
|
||||
IsActive: true,
|
||||
LoginType: models.PLAIN,
|
||||
LoginType: models.LOGIN_PLAIN,
|
||||
}
|
||||
|
||||
if len(form.LoginType) > 0 {
|
||||
|
||||
@@ -43,7 +43,7 @@ func CreateUser(ctx *middleware.Context, form api.CreateUserOption) {
|
||||
Email: form.Email,
|
||||
Passwd: form.Password,
|
||||
IsActive: true,
|
||||
LoginType: models.PLAIN,
|
||||
LoginType: models.LOGIN_PLAIN,
|
||||
}
|
||||
|
||||
parseLoginSource(ctx, u, form.SourceID, form.LoginName)
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
0.7.40.1210 Beta
|
||||
0.7.41.1210 Beta
|
||||
@@ -9,6 +9,7 @@
|
||||
{{.i18n.Tr "settings.change_password"}}
|
||||
</h4>
|
||||
<div class="ui attached segment">
|
||||
{{if .SignedUser.IsLocal}}
|
||||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<div class="required field {{if .Err_OldPassword}}error{{end}}">
|
||||
@@ -28,6 +29,11 @@
|
||||
<button class="ui green button">{{$.i18n.Tr "settings.change_password"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
{{else}}
|
||||
<div class="ui info message">
|
||||
<p class="text left">{{$.i18n.Tr "settings.password_change_disabled"}}</p>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user