mirror of
https://github.com/veops/oneterm.git
synced 2025-10-15 11:50:37 +08:00
fix(api): ssh cli
This commit is contained in:
@@ -521,6 +521,10 @@ func hasPerm[T model.Model](ctx context.Context, md T, resourceTypeName, action
|
||||
}
|
||||
|
||||
func handlePermissions[T any](ctx *gin.Context, data []T, resourceTypeName string) (err error) {
|
||||
if info := cast.ToBool(ctx.Query("info")); info {
|
||||
return
|
||||
}
|
||||
|
||||
currentUser, _ := acl.GetSessionFromCtx(ctx)
|
||||
|
||||
if !lo.Contains(conf.PermResource, resourceTypeName) {
|
||||
|
Reference in New Issue
Block a user