rbac

package
v1.0.839 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: Apache-2.0 Imports: 22 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRoleForUser

func AddRoleForUser(user string, role ...string) error

func Check

func Check(ctx context.Context, subject, object, action string) bool

func DeleteAllRolesForUser

func DeleteAllRolesForUser(user string) error

func DeleteRole

func DeleteRole(role string) (bool, error)

func DeleteRoleForUser

func DeleteRoleForUser(user string, role string) error

func Enforcer

func Enforcer() *casbin.SyncedCachedEnforcer

func GetActionFromHttpMethod

func GetActionFromHttpMethod(method string) string

func GetObjectByTable

func GetObjectByTable(resource string) string

func Init

func Init(ctx context.Context, adminUserID string) error

func PermsForUser

func PermsForUser(user string) ([]policy.Permission, error)

func ReloadPolicy

func ReloadPolicy() error

func RolesForUser

func RolesForUser(user string) ([]string, error)

func Stop

func Stop()

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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