permissions

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2018 License: MIT Imports: 14 Imported by: 2

README

data, read data, write data_i18n, write

data_sensitive, read data_sensitive, write data_sensitive_i18n, write

data_private, read data_private, write data_private_i18n, write

metadata, read metadata, write metadata_i18n, write

upload tag

data collections content_units files operations

metadata authors sources tags persons publishers

archive_admin all archive_editor data_sensitive_, metadata, upload, tag archive_uploader data_sensitive_, upload archive_typist data read, upload archive_tagger data_sensitive_*, tag bb_user data read, metadata read

Pending Approval BB Users IT Finance Shidur Management Akladot Maklidot Editors

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticationMiddleware

func AuthenticationMiddleware() gin.HandlerFunc

func NewEnforcer

func NewEnforcer() (*casbin.Enforcer, error)

Types

type BindataPolicyAdapter

type BindataPolicyAdapter struct {
}

func NewBindataPolicyAdapter

func NewBindataPolicyAdapter() *BindataPolicyAdapter

func (*BindataPolicyAdapter) AddPolicy

func (a *BindataPolicyAdapter) AddPolicy(sec string, ptype string, rule []string) error

AddPolicy adds a policy rule to the storage.

func (*BindataPolicyAdapter) LoadPolicy

func (a *BindataPolicyAdapter) LoadPolicy(model model.Model) error

LoadPolicy loads all policy rules from the storage.

func (*BindataPolicyAdapter) RemoveFilteredPolicy

func (a *BindataPolicyAdapter) RemoveFilteredPolicy(sec string, ptype string, fieldIndex int, fieldValues ...string) error

RemoveFilteredPolicy removes policy rules that match the filter from the storage.

func (*BindataPolicyAdapter) RemovePolicy

func (a *BindataPolicyAdapter) RemovePolicy(sec string, ptype string, rule []string) error

RemovePolicy removes a policy rule from the storage.

func (*BindataPolicyAdapter) SavePolicy

func (a *BindataPolicyAdapter) SavePolicy(model model.Model) error

SavePolicy saves all policy rules to the storage.

type IDTokenClaims

type IDTokenClaims struct {
	Acr               string           `json:"acr"`
	AllowedOrigins    []string         `json:"allowed-origins"`
	Aud               string           `json:"aud"`
	AuthTime          int              `json:"auth_time"`
	Azp               string           `json:"azp"`
	Email             string           `json:"email"`
	Exp               int              `json:"exp"`
	FamilyName        string           `json:"family_name"`
	GivenName         string           `json:"given_name"`
	Iat               int              `json:"iat"`
	Iss               string           `json:"iss"`
	Jti               string           `json:"jti"`
	Name              string           `json:"name"`
	Nbf               int              `json:"nbf"`
	Nonce             string           `json:"nonce"`
	PreferredUsername string           `json:"preferred_username"`
	RealmAccess       Roles            `json:"realm_access"`
	ResourceAccess    map[string]Roles `json:"resource_access"`
	SessionState      string           `json:"session_state"`
	Sub               string           `json:"sub"`
	Typ               string           `json:"typ"`
}

type Roles

type Roles struct {
	Roles []string `json:"roles"`
}

Jump to

Keyboard shortcuts

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