feat: file permission.
This commit is contained in:
@@ -28,6 +28,10 @@ func RequireHeartRateOperatorOrHigher() gin.HandlerFunc {
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
if role == models.UserRoleSuperAdmin {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
|
||||
flavorValue, exists := c.Get("flavorType")
|
||||
if !exists {
|
||||
|
||||
@@ -29,6 +29,10 @@ func RequireStepTrainingAccess() gin.HandlerFunc {
|
||||
c.Abort()
|
||||
return
|
||||
}
|
||||
if role == models.UserRoleSuperAdmin {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
|
||||
flavorValue, exists := c.Get("flavorType")
|
||||
if !exists {
|
||||
|
||||
Reference in New Issue
Block a user