resourcelevel

package
v1.168.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: Apache-2.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package resourcelevel narrows a caller's resource claims to their persona's portal resources level (#2225).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(ctx context.Context, claims *resource.Claims, pr *persona.Registry, method string) (*resource.Claims, error)

Apply narrows a caller's resource claims to their persona's portal resources level (#2225): none refuses every resources route, shared reads the caller's own folder, their persona's folder and Global and writes nothing, own drops the persona folders and keeps the caller's own (which an administrator still sees), and persona leaves the claims as they were. An administrator is held to none of it.

A person of an external persona reads only their own folder, never Global or their persona's (#2257, #2290), and writes to it only when the persona lets its people upload (#2258). What is shared with them they read through their shares.

The claims carry the caller's write grants on Global folders (#2684), read once for the request; the level above is the ceiling no grant overrides.

Types

type RefusedError added in v1.166.3

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

RefusedError is a refusal for what the caller's persona allows: the resource handler answers it 403 with its words, and it is a resource.ErrForbidden.

func (*RefusedError) Error added in v1.166.3

func (e *RefusedError) Error() string

func (*RefusedError) Is added in v1.166.3

func (*RefusedError) Is(target error) bool

Is makes every RefusedError a resource.ErrForbidden.

func (*RefusedError) Refusal added in v1.166.3

func (e *RefusedError) Refusal() string

Refusal is what the caller is told.

Jump to

Keyboard shortcuts

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