mirror of
https://github.com/veops/oneterm.git
synced 2025-10-19 13:44:47 +08:00
refactor(backend): authorization v2
This commit is contained in:
@@ -435,10 +435,6 @@ 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(config.PermResource, resourceTypeName) {
|
||||
|
Reference in New Issue
Block a user