acl

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2025 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizeAdmin

func AuthorizeAdmin(next http.Handler) http.Handler

AuthorizeAdmin returns an http.Handler middleware that authorizes only system administrators to proceed to the next handler in the chain.

func AuthorizeUser

func AuthorizeUser(next http.Handler) http.Handler

AuthorizeUser returns an http.Handler middleware that authorizes only authenticated users to proceed to the next handler in the chain. Guest users are rejected with a 401 unauthorized error.

func CheckAccess

func CheckAccess(member, admin bool) func(http.Handler) http.Handler

CheckAccess returns an http.Handler middleware that authorizes only authenticated users with the required member or admin access membership to the requested organization resource.

func CheckAdmin

func CheckAdmin() func(http.Handler) http.Handler

CheckAdmin returns an http.Handler middleware that authorizes only authenticated users with admin membership access to proceed to the next handler in the chain.

func CheckMember

func CheckMember() func(http.Handler) http.Handler

CheckMember returns an http.Handler middleware that authorizes only authenticated users with membership access to proceed to the next handler in the chain.

func InjectOrganization

func InjectOrganization(
	installations core.InstallationStore,
	installationz core.InstallationService,
	memberships core.MembershipStore,
) func(http.Handler) http.Handler

InjectOrganization returns an http.Handler middleware that injects the organization and memberships into the context.

Types

This section is empty.

Jump to

Keyboard shortcuts

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