com

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: Apache-2.0, Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ResourcesEffectedByUserDelete_BATCH_SIZE = 1000

Functions

func IsAdmin

func IsAdmin(jwt auth.Token) bool

Types

type AspectNodeQuery

type AspectNodeQuery struct {
	Ids []string `json:"ids"`
}

type Com

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

func New

func New(config config.Config) *Com

func (*Com) GetAspectNodes

func (this *Com) GetAspectNodes(ids []string, token auth.Token) ([]model.AspectNode, error)

func (*Com) ResourcesEffectedByUserDelete

func (this *Com) ResourcesEffectedByUserDelete(token auth.Token, resource string) (deleteResourceIds []string, deleteUserFromResourceIds []string, err error)

type IdWrapper

type IdWrapper struct {
	Id string `json:"id"`
}

type PermSearchElement

type PermSearchElement struct {
	Id                string            `json:"id"`
	Name              string            `json:"name"`
	Shared            bool              `json:"shared"`
	Creator           string            `json:"creator"`
	PermissionHolders PermissionHolders `json:"permission_holders"`
}

type PermissionHolders

type PermissionHolders struct {
	AdminUsers   []string `json:"admin_users"`
	ReadUsers    []string `json:"read_users"`
	WriteUsers   []string `json:"write_users"`
	ExecuteUsers []string `json:"execute_users"`
}

type Security

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

func NewSecurity

func NewSecurity(config config.Config) (*Security, error)

func (*Security) CheckBool

func (this *Security) CheckBool(jwt auth.Token, kind string, id string, action model.AuthAction) (allowed bool, err error)

func (*Security) CheckMultiple

func (this *Security) CheckMultiple(jwt auth.Token, kind string, ids []string, action model.AuthAction) (result map[string]bool, err error)

func (*Security) GetAsUser

func (this *Security) GetAsUser(jwt auth.Token, url string, result *[]interface{}) (err error)

Jump to

Keyboard shortcuts

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