permissions

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllowAny

type AllowAny struct{}

func (*AllowAny) HasObjectPermission

func (permission *AllowAny) HasObjectPermission(appCtx *appctx.AppContext, model models.BaseModelInterface) bool

func (*AllowAny) HasPermission

func (permission *AllowAny) HasPermission(appCtx *appctx.AppContext) bool

type And

type And struct {
	Permissions []PermissionInterface
}

func (*And) HasObjectPermission

func (permission *And) HasObjectPermission(appCtx *appctx.AppContext, model models.BaseModelInterface) bool

func (*And) HasPermission

func (permission *And) HasPermission(appCtx *appctx.AppContext) bool

type IsAuthenticated

type IsAuthenticated struct {
}

func (*IsAuthenticated) HasObjectPermission

func (permission *IsAuthenticated) HasObjectPermission(appCtx *appctx.AppContext, model models.BaseModelInterface) bool

func (*IsAuthenticated) HasPermission

func (permission *IsAuthenticated) HasPermission(appCtx *appctx.AppContext) bool

type IsSuperUser

type IsSuperUser struct {
}

func (*IsSuperUser) HasObjectPermission

func (permission *IsSuperUser) HasObjectPermission(appCtx *appctx.AppContext, model models.BaseModelInterface) bool

func (*IsSuperUser) HasPermission

func (permission *IsSuperUser) HasPermission(appCtx *appctx.AppContext) bool

type Or

type Or struct {
	Permissions []PermissionInterface
}

func (*Or) HasObjectPermission

func (permission *Or) HasObjectPermission(appCtx *appctx.AppContext, model models.BaseModelInterface) bool

func (*Or) HasPermission

func (permission *Or) HasPermission(appCtx *appctx.AppContext) bool

type PermissionInterface

type PermissionInterface interface {
	HasPermission(*appctx.AppContext) bool
	HasObjectPermission(*appctx.AppContext, models.BaseModelInterface) bool
}

Jump to

Keyboard shortcuts

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