userroles

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 7

Documentation

Index

Constants

View Source
const RECIPE_ID = "userroles"

Variables

This section is empty.

Functions

func AddRoleToUser

func AddRoleToUser(userID string, role string, userContext supertokens.UserContext) (userrolesmodels.AddRoleToUserResponse, error)

func AfterEach

func AfterEach()

func BeforeEach

func BeforeEach()

func CreateNewRoleOrAddPermissions

func CreateNewRoleOrAddPermissions(role string, permissions []string, userContext supertokens.UserContext) (userrolesmodels.CreateNewRoleOrAddPermissionsResponse, error)

func DeleteRole

func DeleteRole(role string, userContext supertokens.UserContext) (userrolesmodels.DeleteRoleResponse, error)

func GetRolesForUser

func GetRolesForUser(userID string, userContext supertokens.UserContext) (userrolesmodels.GetRolesForUserResponse, error)

func GetRolesThatHavePermission

func GetRolesThatHavePermission(permission string, userContext supertokens.UserContext) (userrolesmodels.GetRolesThatHavePermissionResponse, error)

func NewPermissionClaim added in v0.9.0

func NewUserRoleClaim added in v0.9.0

func RemovePermissionsFromRole

func RemovePermissionsFromRole(role string, permissions []string, userContext supertokens.UserContext) (userrolesmodels.RemovePermissionsFromRoleResponse, error)

func RemoveUserRole

func RemoveUserRole(userID string, role string, userContext supertokens.UserContext) (userrolesmodels.RemoveUserRoleResponse, error)

func ResetForTest

func ResetForTest()

Types

type Recipe

type Recipe struct {
	RecipeModule supertokens.RecipeModule
	Config       userrolesmodels.TypeNormalisedInput
	RecipeImpl   userrolesmodels.RecipeInterface
}

func MakeRecipe

func MakeRecipe(recipeId string, appInfo supertokens.NormalisedAppinfo, config *userrolesmodels.TypeInput, onSuperTokensAPIError func(err error, req *http.Request, res http.ResponseWriter)) (Recipe, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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