mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	Minor fix for #2634
Add AttributesInBind option in new auth source form.
This commit is contained in:
		| @@ -3,7 +3,7 @@ Gogs - Go Git Service [ |  | ||||||
|  |  | ||||||
| ##### Current version: 0.8.40 | ##### Current version: 0.8.41 | ||||||
|  |  | ||||||
| | Web | UI  | Preview  | | | Web | UI  | Preview  | | ||||||
| |:-------------:|:-------:|:-------:| | |:-------------:|:-------:|:-------:| | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							| @@ -17,7 +17,7 @@ import ( | |||||||
| 	"github.com/gogits/gogs/modules/setting" | 	"github.com/gogits/gogs/modules/setting" | ||||||
| ) | ) | ||||||
|  |  | ||||||
| const APP_VER = "0.8.40.0219" | const APP_VER = "0.8.41.0220" | ||||||
|  |  | ||||||
| func init() { | func init() { | ||||||
| 	runtime.GOMAXPROCS(runtime.NumCPU()) | 	runtime.GOMAXPROCS(runtime.NumCPU()) | ||||||
|   | |||||||
| @@ -28,11 +28,11 @@ type LoginType int | |||||||
| // Note: new type must be added at the end of list to maintain compatibility. | // Note: new type must be added at the end of list to maintain compatibility. | ||||||
| const ( | const ( | ||||||
| 	LOGIN_NOTYPE LoginType = iota | 	LOGIN_NOTYPE LoginType = iota | ||||||
| 	LOGIN_PLAIN | 	LOGIN_PLAIN            // 1 | ||||||
| 	LOGIN_LDAP | 	LOGIN_LDAP             // 2 | ||||||
| 	LOGIN_SMTP | 	LOGIN_SMTP             // 3 | ||||||
| 	LOGIN_PAM | 	LOGIN_PAM              // 4 | ||||||
| 	LOGIN_DLDAP | 	LOGIN_DLDAP            // 5 | ||||||
| ) | ) | ||||||
|  |  | ||||||
| var ( | var ( | ||||||
| @@ -42,7 +42,7 @@ var ( | |||||||
|  |  | ||||||
| var LoginNames = map[LoginType]string{ | var LoginNames = map[LoginType]string{ | ||||||
| 	LOGIN_LDAP:  "LDAP (via BindDN)", | 	LOGIN_LDAP:  "LDAP (via BindDN)", | ||||||
| 	LOGIN_DLDAP: "LDAP (simple auth)", | 	LOGIN_DLDAP: "LDAP (simple auth)", // Via direct bind | ||||||
| 	LOGIN_SMTP:  "SMTP", | 	LOGIN_SMTP:  "SMTP", | ||||||
| 	LOGIN_PAM:   "PAM", | 	LOGIN_PAM:   "PAM", | ||||||
| } | } | ||||||
|   | |||||||
| @@ -1 +1 @@ | |||||||
| 0.8.40.0219 | 0.8.41.0220 | ||||||
| @@ -120,6 +120,12 @@ | |||||||
| 							<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}" /> | 							<input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}" /> | ||||||
| 						</div> | 						</div> | ||||||
|  |  | ||||||
|  | 						<div class="ldap field"> | ||||||
|  | 							<div class="ui checkbox"> | ||||||
|  | 								<label><strong>{{.i18n.Tr "admin.auths.attributes_in_bind"}}</strong></label> | ||||||
|  | 								<input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}> | ||||||
|  | 							</div> | ||||||
|  | 						</div> | ||||||
| 						<div class="ldap dldap smtp inline field {{if not (or (or (eq .type 2) (eq .type 5)) (eq .type 3))}}hide{{end}}"> | 						<div class="ldap dldap smtp inline field {{if not (or (or (eq .type 2) (eq .type 5)) (eq .type 3))}}hide{{end}}"> | ||||||
| 							<div class="ui checkbox"> | 							<div class="ui checkbox"> | ||||||
| 								<label><strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong></label> | 								<label><strong>{{.i18n.Tr "admin.auths.enable_tls"}}</strong></label> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user