permission

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2017 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// PermissionRead  read permission on the resource
	PermissionRead = 4
	// PermissionReadExecute  read & execute permission on the resource
	PermissionReadExecute = 5
	// PermissionReadWriteExecute read/execute/write permission on the resource
	PermissionReadWriteExecute = 7
)

Variables

View Source
var (
	// SharedInfraGroupID must be init from elsewhere with group.SharedInfraGroup
	SharedInfraGroupID int64
)

Functions

func AccessToApplication

func AccessToApplication(applicationID int64, user *sdk.User, access int) bool

AccessToApplication check if we can modify the given application

func AccessToEnvironment

func AccessToEnvironment(envID int64, user *sdk.User, access int) bool

AccessToEnvironment check if we can modify the given environment

func AccessToPipeline

func AccessToPipeline(environmentID, pipelineID int64, user *sdk.User, access int) bool

AccessToPipeline check if we can modify the given pipeline

func ApplicationPermission

func ApplicationPermission(applicationID int64, user *sdk.User) int

ApplicationPermission Get the permission for the given application

func ApplicationPipelineEnvironmentUsers

func ApplicationPipelineEnvironmentUsers(db database.Querier, appID, pipID, envID int64, access int) ([]sdk.User, error)

ApplicationPipelineEnvironmentUsers returns users list with expected access to application/pipeline/environment

func EnvironmentPermission

func EnvironmentPermission(envID int64, user *sdk.User) int

EnvironmentPermission Get the permission for the given environment

func PipelinePermission

func PipelinePermission(pipelineID int64, user *sdk.User) int

PipelinePermission Get the permission for the given pipeline

func ProjectPermission

func ProjectPermission(projectKey string, user *sdk.User) int

ProjectPermission Get the permission for the given project

Types

This section is empty.

Jump to

Keyboard shortcuts

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