userroles

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const RECIPE_ID = "userroles"

Variables

This section is empty.

Functions

func AddRoleToUser

func AddRoleToUser(tenantId string, 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(tenantId string, userID string, userContext ...supertokens.UserContext) (userrolesmodels.GetRolesForUserResponse, error)

func GetRolesThatHavePermission

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

func GetUsersThatHaveRole

func GetUsersThatHaveRole(tenantId string, role string, userContext ...supertokens.UserContext) (userrolesmodels.GetUsersThatHaveRoleResponse, error)

func RemovePermissionsFromRole

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

func RemoveUserRole

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

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