secret

package
v1.4.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecurityContext

type SecurityContext struct {
	// contains filtered or unexported fields
}

SecurityContext implements security.Context interface based on secret store

func NewSecurityContext

func NewSecurityContext(secret string, store *secret.Store) *SecurityContext

NewSecurityContext ...

func (*SecurityContext) GetMyProjects

func (s *SecurityContext) GetMyProjects() ([]*models.Project, error)

GetMyProjects ...

func (*SecurityContext) GetProjectRoles

func (s *SecurityContext) GetProjectRoles(projectIDOrName interface{}) []int

GetProjectRoles return guest role if has read permission, otherwise return nil

func (*SecurityContext) GetUsername

func (s *SecurityContext) GetUsername() string

GetUsername returns the corresponding username of the secret or null if the secret is invalid

func (*SecurityContext) HasAllPerm

func (s *SecurityContext) HasAllPerm(projectIDOrName interface{}) bool

HasAllPerm always returns false

func (*SecurityContext) HasReadPerm

func (s *SecurityContext) HasReadPerm(projectIDOrName interface{}) bool

HasReadPerm returns true if the corresponding user of the secret is jobservice, otherwise returns false

func (*SecurityContext) HasWritePerm

func (s *SecurityContext) HasWritePerm(projectIDOrName interface{}) bool

HasWritePerm always returns false

func (*SecurityContext) IsAuthenticated

func (s *SecurityContext) IsAuthenticated() bool

IsAuthenticated returns true if the secret is valid

func (*SecurityContext) IsSolutionUser

func (s *SecurityContext) IsSolutionUser() bool

IsSolutionUser ...

func (*SecurityContext) IsSysAdmin

func (s *SecurityContext) IsSysAdmin() bool

IsSysAdmin always returns false

Jump to

Keyboard shortcuts

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