Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
admpub committed Nov 26, 2024
1 parent 3bec8a6 commit 0d12199
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
4 changes: 2 additions & 2 deletions application/handler/index/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ func init() {
route.Register(func(e echo.RouteRegister) {
e.Route("GET", ``, Index)
e.Route("GET", `/`, Index)
e.Route("GET", `/project/:ident`, Project).SetMetaKV(route.PermPublicKV())
e.Route("GET", `/project/:ident`, Project).SetMetaKV(httpserver.PermPublicKV())
e.Route("GET", `/index`, Index)
e.Route("GET,POST", `/login`, Login)
e.Route("GET,POST", `/register`, route.HandlerWithRequest(Register, request.Register{}, `POST`))
e.Route("GET", `/logout`, Logout)
dashboard := httpserver.Backend.Dashboard
if dashboard.TopButtons.FindTmpl(`manager/topbutton/donation`) > -1 {
e.Route("GET", `/donation/:type`, Donation).SetMetaKV(route.PermGuestKV())
e.Route("GET", `/donation/:type`, Donation).SetMetaKV(httpserver.PermGuestKV())
}
//e.Route(`GET,POST`, `/ping`, Ping)
e.Get(`/icon`, Icon, middleware.AuthCheck)
Expand Down
5 changes: 3 additions & 2 deletions application/handler/index/route.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import (
"github.com/webx-top/com"

"github.com/coscms/webcore/library/backend"
"github.com/coscms/webcore/library/httpserver"
"github.com/coscms/webcore/library/nerrors"
premLib "github.com/coscms/webcore/library/perm"
"github.com/coscms/webcore/library/role"
Expand Down Expand Up @@ -64,8 +65,8 @@ var UnlimitedURLs = []string{
}

var HandlerPermissions = []string{
route.PermissionGuest, // 游客可浏览
route.PermissionPublic, // 任意登录用户可浏览
httpserver.PermissionGuest, // 游客可浏览
httpserver.PermissionPublic, // 任意登录用户可浏览
}

func RouteNotin(ctx echo.Context) error {
Expand Down
3 changes: 2 additions & 1 deletion application/handler/user/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
package user

import (
"github.com/coscms/webcore/library/httpserver"
"github.com/coscms/webcore/registry/route"
"github.com/webx-top/echo"
ws "github.com/webx-top/echo/handler/websocket"
Expand All @@ -37,5 +38,5 @@ func init() {
g.Route("GET,POST", `/oauth_delete/:id`, metaHandler(echo.H{`name`: `oAuth账号解绑`}, oAuthDelete))

ws.New("/notice", Notice).Wrapper(g)
}).SetMetaKV(route.MetaKeyPermission, route.PermissionPublic)
}).SetMetaKV(httpserver.PermPublicKV())
}
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ require (
github.com/admpub/copier v0.1.1
github.com/admpub/go-ps v0.0.1
github.com/admpub/regexp2 v1.1.8
github.com/coscms/webcore v0.6.11
github.com/coscms/webcore v0.6.13
github.com/nging-plugins/caddymanager v1.7.0
github.com/nging-plugins/collector v1.7.0
github.com/nging-plugins/dbmanager v1.7.0
Expand All @@ -47,9 +47,9 @@ require (
github.com/nging-plugins/firewallmanager v1.7.0
github.com/nging-plugins/frpmanager v1.7.0
github.com/nging-plugins/ftpmanager v1.7.0
github.com/nging-plugins/servermanager v1.7.0
github.com/nging-plugins/servermanager v1.7.1
github.com/nging-plugins/sshmanager v1.7.0
github.com/nging-plugins/webauthn v1.7.0
github.com/nging-plugins/webauthn v1.7.1
)

require (
Expand Down Expand Up @@ -256,7 +256,7 @@ require (
github.com/boombuler/barcode v1.0.2 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/coscms/forms v1.13.6 // indirect
github.com/coscms/forms v1.13.7 // indirect
github.com/coscms/go-imgparse v0.0.1 // indirect
github.com/coscms/oauth2s v0.4.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1093,8 +1093,8 @@ github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/coscms/captcha v0.1.2 h1:O3yobo+KHFEXt07ly/8Ai+qlzlixcCoRG9WJHHim9Iw=
github.com/coscms/captcha v0.1.2/go.mod h1:PaypG8YfWlSJDRsWqA93HBW3RgLxJozcPaDaLhSO/qQ=
github.com/coscms/forms v1.13.6 h1:h9ADNFMT53hvXlMi5ds6G0qydMJcgUQtdAbglgxsLyY=
github.com/coscms/forms v1.13.6/go.mod h1:xhhPi+sY4xDRKERRdRI1F14znloIYSlZ8euF2fA7VMs=
github.com/coscms/forms v1.13.7 h1:ddqZ6YUXqh2LUh0b89bN1hSjJTYNOu8SiG9iGcABNvU=
github.com/coscms/forms v1.13.7/go.mod h1:xhhPi+sY4xDRKERRdRI1F14znloIYSlZ8euF2fA7VMs=
github.com/coscms/go-imgparse v0.0.1 h1:RMnw3/VtfTOil3SdukPgdGm4xmO5KoQpyVNtPKuFKFY=
github.com/coscms/go-imgparse v0.0.1/go.mod h1:FqBNWVAozSee1bB11G8ohGq5artPO7Zz3xLtw3d4Kdk=
github.com/coscms/oauth2s v0.4.1 h1:wt8IpmGmI/mwecKwjbdDWsGhecFJtJ2todeTdWWEg+0=
Expand All @@ -1111,8 +1111,8 @@ github.com/coscms/session-sqlstore v0.0.0-20241123103622-54cef6a2850b h1:PoyLDTS
github.com/coscms/session-sqlstore v0.0.0-20241123103622-54cef6a2850b/go.mod h1:fkbU1N2At0fP38do0UvwcPN/6RXBlxoMQ2agI5JXVkk=
github.com/coscms/webauthn v0.3.1 h1:ycolyzptBj7d+boEvxw1JAGkgJcR8r6kVSA4wDrahNk=
github.com/coscms/webauthn v0.3.1/go.mod h1:nyMNZvFm9cArfyu6RQjrGvI+CCsl9mcC01jT4MsmByQ=
github.com/coscms/webcore v0.6.11 h1:O34tFB0E5HwDa4MzQemJ0LQBtWoCnTzziljl3l+JUgs=
github.com/coscms/webcore v0.6.11/go.mod h1:J6RU37DxHjAyAdr9TZcIWaeAPpEKxqxNMKH5QtYVfeE=
github.com/coscms/webcore v0.6.13 h1:+WC5k5oT4uiySswx0JBkfI5CRdyQLdqxMyfAZE7mMOQ=
github.com/coscms/webcore v0.6.13/go.mod h1:rYD8iwUx5I5o0dMnT10yYqohCpHDqaForYA0i4s778g=
github.com/cpu/goacmedns v0.1.1/go.mod h1:MuaouqEhPAHxsbqjgnck5zeghuwBP1dLnPoobeGqugQ=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
Expand Down Expand Up @@ -1950,12 +1950,12 @@ github.com/nging-plugins/frpmanager v1.7.0 h1:g9me6PMCgwRTB7vkpiIdzqk8Pl8e5I0t6g
github.com/nging-plugins/frpmanager v1.7.0/go.mod h1:jSGURU8PA+mcCu2ZLrPieWk7e/K4jPZqDzY/bzkJXQA=
github.com/nging-plugins/ftpmanager v1.7.0 h1:fqPKkph0Vch7J0EG06l4n4NQAAdAIyrOJw4fe6x0CYQ=
github.com/nging-plugins/ftpmanager v1.7.0/go.mod h1:/azwL0TvR0mJ0GcdsFpm3L1C1QBmgVW8xIKI4h3OqLI=
github.com/nging-plugins/servermanager v1.7.0 h1:u3M4h3ytGGZqNFLaKTV8IL0Co50/snI6CHbgkXJyL94=
github.com/nging-plugins/servermanager v1.7.0/go.mod h1:h7SuRoi97/7CuKPanwSo0igegWGWpgyxUMXam6Am6s4=
github.com/nging-plugins/servermanager v1.7.1 h1:ZivfYV6/c0RN7O6mL8nc7w+Z4EvhwEZgkMX5T9MxOxM=
github.com/nging-plugins/servermanager v1.7.1/go.mod h1:PWtvdLYM6mc0ZKH27pXOhYRO8B8yMwQtTLY8+gtI3hc=
github.com/nging-plugins/sshmanager v1.7.0 h1:J+n+44PPMkVmXyCzWQ8ZLlZfwO4+K4+BHwOI3LduR+E=
github.com/nging-plugins/sshmanager v1.7.0/go.mod h1:MmX2zzk4D7Dyb+YQTwz+FxXIwglBXAFJSdW+U6KgKz8=
github.com/nging-plugins/webauthn v1.7.0 h1:MwwtMjCZQ/YnUFgP1tLNJ8OI1VDG9OYGOGb4YZshNLw=
github.com/nging-plugins/webauthn v1.7.0/go.mod h1:5fPUm8OU6P+ryiXyyGmgJPqeTrUm6Oxjo25sKc3h1tY=
github.com/nging-plugins/webauthn v1.7.1 h1:HpKEWKuCXeorO69j97PNHWDWm2gtrmd0zTlJDAb4vjU=
github.com/nging-plugins/webauthn v1.7.1/go.mod h1:o7IHGTUNmDG/7C8bxd5hFRBy38nQZ9I4/xGdT8/SSM8=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nrdcg/auroradns v1.0.1/go.mod h1:y4pc0i9QXYlFCWrhWrUSIETnZgrf4KuwjDIWmmXo3JI=
github.com/nrdcg/auroradns v1.1.0/go.mod h1:O7tViUZbAcnykVnrGkXzIJTHoQCHcgalgAe6X1mzHfk=
Expand Down

0 comments on commit 0d12199

Please sign in to comment.