perm

package
v0.23.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

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

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 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL