roleutils

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: AGPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUserRolePermission

func AddUserRolePermission(ctx echo.Context, roleID uint) (err error)

func EditUserRolePermission

func EditUserRolePermission(ctx echo.Context, roleID uint) (err error)

func GetRoleList

func GetRoleList(c echo.Context) (roleList []*role.UserRoleWithPermissions)

func UserRolePermissionTypeCheck

func UserRolePermissionTypeCheck(ctx echo.Context, current string, typ string, permission string, parsed interface{}) (mp interface{}, err error)

func UserRolePermissionTypeFireRender

func UserRolePermissionTypeFireRender(ctx echo.Context) (err error)

func UserRolePermissionTypeGenerate

func UserRolePermissionTypeGenerate(ctx echo.Context) (mp map[string]string, err error)

func UserRoles

func UserRoles(ctx echo.Context) []*role.UserRoleWithPermissions

Types

type UserRoleWithPermissions

type UserRoleWithPermissions struct {
	*dbschema.NgingUserRole
	Permissions []*dbschema.NgingUserRolePermission `db:"-,relation=role_id:id"`
}

Jump to

Keyboard shortcuts

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