mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-20 03:43:59 +08:00
Remove PAM from auth dropdown when unavailable (#13276)
Signed-off-by: jolheiser <john.olheiser@gmail.com>
This commit is contained in:
@ -12,6 +12,9 @@ import (
|
||||
"github.com/msteinert/pam"
|
||||
)
|
||||
|
||||
// Supported is true when built with PAM
|
||||
var Supported = true
|
||||
|
||||
// Auth pam auth service
|
||||
func Auth(serviceName, userName, passwd string) (string, error) {
|
||||
t, err := pam.StartFunc(serviceName, userName, func(s pam.Style, msg string) (string, error) {
|
||||
|
@ -10,6 +10,9 @@ import (
|
||||
"errors"
|
||||
)
|
||||
|
||||
// Supported is false when built without PAM
|
||||
var Supported = false
|
||||
|
||||
// Auth not supported lack of pam tag
|
||||
func Auth(serviceName, userName, passwd string) (string, error) {
|
||||
return "", errors.New("PAM not supported")
|
||||
|
Reference in New Issue
Block a user