Permissions

package
v0.2.29 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUserPermission

func AddUserPermission(userID, permissionID int) error

func CreatePermission

func CreatePermission(name, permission string) error

only all:all perms can do this

func DeletePermission

func DeletePermission(id int) error

func GetAllUsersPermissions

func GetAllUsersPermissions() ([]database.Permission, error)

func GetPermissions

func GetPermissions() ([]database.Permission, error)

func GetUserPermissions

func GetUserPermissions(userID int) ([]database.Permission, error)

only the own user or all:all perms can do this

func HasPermission

func HasPermission(userID int, requiredPermission string) bool

func RemoveUserPermission

func RemoveUserPermission(userID, permissionID int) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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