permissions

package
v0.0.0-...-26505bb Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: AGPL-3.0 Imports: 18 Imported by: 1

Documentation

Overview

Package permissions is the HTTP handlers for managing the permissions on a Cozy (creating a share by link for example).

Index

Constants

View Source
const ContextClaims = "token_claims"

ContextClaims is the key used in echo context to store claims

View Source
const ContextPermissionSet = "permissions_set"

ContextPermissionSet is the key used in echo context to store permissions set

Variables

View Source
var ErrPatchCodeOrSet = echo.NewHTTPError(http.StatusBadRequest,
	"The patch doc should have property 'codes' or 'permissions', not both")

ErrPatchCodeOrSet is returned when an attempt is made to patch both code & set in one request

Functions

func Routes

func Routes(router *echo.Group)

Routes sets the routing for the permissions service

Types

type APIPermission

type APIPermission struct {
	*permission.Permission
	// contains filtered or unexported fields
}

APIPermission is the struct that will be used to serialized a permission to JSON-API

func (*APIPermission) Included

func (p *APIPermission) Included() []jsonapi.Object

Included implements jsonapi.Doc

func (p *APIPermission) Links() *jsonapi.LinksList

Links implements jsonapi.Doc

func (*APIPermission) MarshalJSON

func (p *APIPermission) MarshalJSON() ([]byte, error)

MarshalJSON implements jsonapi.Doc

func (*APIPermission) Relationships

func (p *APIPermission) Relationships() jsonapi.RelationshipMap

Relationships implements jsonapi.Doc

Jump to

Keyboard shortcuts

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