permissions

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllScopes

func AllScopes() []string

func NewPermissionsService

func NewPermissionsService(db *gorm.DB, eventPublisher events.EventPublisher) *permissionsService

func RequestMethodToScope

func RequestMethodToScope(requestMethod string) (string, error)

func RequestMethodsToScopes

func RequestMethodsToScopes(requestMethods []string) ([]string, error)

Types

type PermissionsService

type PermissionsService interface {
	HasPermission(app *db.App, requestMethod string) (result bool, code string, message string)
	GetPermittedMethods(app *db.App, lnClient lnclient.LNClient) []string
	PermitsNotifications(app *db.App) bool
}

TODO: does this need to be a service?

Jump to

Keyboard shortcuts

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