gatekeeper

package
v0.0.0-...-cea7f4a Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAccountStatus

func CheckAccountStatus(userId string, db *bun.DB) (bool, error)

func CheckAdmin

func CheckAdmin(userID uuid.UUID, db *bun.DB) (bool, error)

func CheckEditorOrAdmin

func CheckEditorOrAdmin(userID uuid.UUID, db *bun.DB) (bool, error)

func CheckRequestUserProjectModifyRole

func CheckRequestUserProjectModifyRole(projectID string, context *gin.Context, db *bun.DB) (bool, error)

func CheckSelfServicePageAccess

func CheckSelfServicePageAccess(projectID string, context *gin.Context, db *bun.DB) (bool, error)

CheckSelfServicePageAccess returns true if the current user can view/use the page. Any project member (Owner, Editor, Viewer) has access. Admins always have access. Returns false, nil when the user simply lacks membership (not an error).

func CheckSelfServicePageManageAccess

func CheckSelfServicePageManageAccess(projectID string, context *gin.Context, db *bun.DB) (bool, error)

CheckSelfServicePageManageAccess returns true if the current user can create/edit/delete pages. Requires admin or editor global role, OR project Owner/Editor membership.

func CheckUserProjectAccess

func CheckUserProjectAccess(projectID string, context *gin.Context, db *bun.DB) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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