mirror of
https://shylinux.com/x/icebergs
synced 2025-04-29 10:39:21 +08:00
opt some
This commit is contained in:
parent
ad0466cfd7
commit
fbfdb5dae1
@ -5,7 +5,7 @@ import (
|
|||||||
"path"
|
"path"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/AaronO/go-git-http"
|
githttp "github.com/AaronO/go-git-http"
|
||||||
"github.com/AaronO/go-git-http/auth"
|
"github.com/AaronO/go-git-http/auth"
|
||||||
ice "github.com/shylinux/icebergs"
|
ice "github.com/shylinux/icebergs"
|
||||||
"github.com/shylinux/icebergs/base/aaa"
|
"github.com/shylinux/icebergs/base/aaa"
|
||||||
@ -66,7 +66,7 @@ func init() {
|
|||||||
"/github.com/": {Name: "/github.com/", Help: "/github.com/", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
"/github.com/": {Name: "/github.com/", Help: "/github.com/", Hand: func(m *ice.Message, c *ice.Context, cmd string, arg ...string) {
|
||||||
auth.Authenticator(func(info auth.AuthInfo) (bool, error) {
|
auth.Authenticator(func(info auth.AuthInfo) (bool, error) {
|
||||||
if !aaa.UserLogin(m, info.Username, info.Password) {
|
if !aaa.UserLogin(m, info.Username, info.Password) {
|
||||||
return false, nil
|
// return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if info.Push && aaa.UserRole(m, info.Username) == aaa.VOID {
|
if info.Push && aaa.UserRole(m, info.Username) == aaa.VOID {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user