Skip to content

Commit e9c6053

Browse files
authored
Merge pull request #246 from Bwko/fix/typo
Fix typos
2 parents 177a4c7 + 2a449bd commit e9c6053

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

models/issue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ func newIssue(e *xorm.Session, opts NewIssueOptions) (err error) {
664664
}
665665

666666
if len(opts.LableIDs) > 0 {
667-
// During the session, SQLite3 dirver cannot handle retrieve objects after update something.
667+
// During the session, SQLite3 driver cannot handle retrieve objects after update something.
668668
// So we have to get all needed labels first.
669669
labels := make([]*Label, 0, len(opts.LableIDs))
670670
if err = e.In("id", opts.LableIDs).Find(&labels); err != nil {

models/login_source.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ func composeFullName(firstname, surname, username string) string {
328328

329329
// LoginViaLDAP queries if login/password is valid against the LDAP directory pool,
330330
// and create a local user if success when enabled.
331-
func LoginViaLDAP(user *User, login, passowrd string, source *LoginSource, autoRegister bool) (*User, error) {
332-
username, fn, sn, mail, isAdmin, succeed := source.Cfg.(*LDAPConfig).SearchEntry(login, passowrd, source.Type == LoginDLDAP)
331+
func LoginViaLDAP(user *User, login, password string, source *LoginSource, autoRegister bool) (*User, error) {
332+
username, fn, sn, mail, isAdmin, succeed := source.Cfg.(*LDAPConfig).SearchEntry(login, password, source.Type == LoginDLDAP)
333333
if !succeed {
334334
// User not in LDAP, do nothing
335335
return nil, ErrUserNotExist{0, login, 0}
@@ -545,7 +545,7 @@ func ExternalUserLogin(user *User, login, password string, source *LoginSource,
545545
}
546546

547547
// UserSignIn validates user name and password.
548-
func UserSignIn(username, passowrd string) (*User, error) {
548+
func UserSignIn(username, password string) (*User, error) {
549549
var user *User
550550
if strings.Contains(username, "@") {
551551
user = &User{Email: strings.ToLower(username)}
@@ -561,7 +561,7 @@ func UserSignIn(username, passowrd string) (*User, error) {
561561
if hasUser {
562562
switch user.LoginType {
563563
case LoginNoType, LoginPlain:
564-
if user.ValidatePassword(passowrd) {
564+
if user.ValidatePassword(password) {
565565
return user, nil
566566
}
567567

@@ -576,7 +576,7 @@ func UserSignIn(username, passowrd string) (*User, error) {
576576
return nil, ErrLoginSourceNotExist{user.LoginSource}
577577
}
578578

579-
return ExternalUserLogin(user, user.LoginName, passowrd, &source, false)
579+
return ExternalUserLogin(user, user.LoginName, password, &source, false)
580580
}
581581
}
582582

@@ -586,7 +586,7 @@ func UserSignIn(username, passowrd string) (*User, error) {
586586
}
587587

588588
for _, source := range sources {
589-
authUser, err := ExternalUserLogin(nil, username, passowrd, source, true)
589+
authUser, err := ExternalUserLogin(nil, username, password, source, true)
590590
if err == nil {
591591
return authUser, nil
592592
}

modules/auth/repo_form.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func (f *MigrateRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) bi
5252
}
5353

5454
// ParseRemoteAddr checks if given remote address is valid,
55-
// and returns composed URL with needed username and passowrd.
55+
// and returns composed URL with needed username and password.
5656
// It also checks if given user has permission when remote address
5757
// is actually a local path.
5858
func (f MigrateRepoForm) ParseRemoteAddr(user *models.User) (string, error) {

0 commit comments

Comments
 (0)