Documentation ¶
Overview ¶
Package perm provides the ability for validating the access control to Vela resources in the middleware chain for the API.
Usage:
import "github.com/go-vela/server/router/middleware/perm"
Index ¶
- func MustAdmin() gin.HandlerFunc
- func MustBuildAccess() gin.HandlerFunc
- func MustIDRequestToken() gin.HandlerFunc
- func MustPlatformAdmin() gin.HandlerFunc
- func MustRead() gin.HandlerFunc
- func MustSecretAdmin() gin.HandlerFunc
- func MustWorkerAuthToken() gin.HandlerFunc
- func MustWorkerRegisterToken() gin.HandlerFunc
- func MustWrite() gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustAdmin ¶
func MustAdmin() gin.HandlerFunc
MustAdmin ensures the user has admin access to the repo.
func MustBuildAccess ¶ added in v0.18.0
func MustBuildAccess() gin.HandlerFunc
MustBuildAccess ensures the token is a build token for the appropriate build.
func MustIDRequestToken ¶ added in v0.24.0
func MustIDRequestToken() gin.HandlerFunc
MustIDRequestToken ensures the token is a valid ID request token for the appropriate build.
func MustPlatformAdmin ¶
func MustPlatformAdmin() gin.HandlerFunc
MustPlatformAdmin ensures the user has admin access to the platform.
func MustRead ¶
func MustRead() gin.HandlerFunc
MustRead ensures the user has admin, write or read access to the repo.
func MustSecretAdmin ¶
func MustSecretAdmin() gin.HandlerFunc
MustSecretAdmin ensures the user has admin access to the org, repo or team.
func MustWorkerAuthToken ¶ added in v0.19.0
func MustWorkerAuthToken() gin.HandlerFunc
MustWorkerAuthToken ensures the token is a worker auth token.
func MustWorkerRegisterToken ¶ added in v0.19.0
func MustWorkerRegisterToken() gin.HandlerFunc
MustWorkerRegisterToken ensures the token is a registration token retrieved by a platform admin.
func MustWrite ¶
func MustWrite() gin.HandlerFunc
MustWrite ensures the user has admin or write access to the repo.
Types ¶
This section is empty.