From 744dd7dac9eb473e4111edfc99e41b60cdbe2fc6 Mon Sep 17 00:00:00 2001 From: Sonja Happ Date: Mon, 9 Sep 2019 12:40:33 +0200 Subject: [PATCH] user var name instead of absolute value --- common/roles.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/roles.go b/common/roles.go index 8194724..aa8d4a9 100644 --- a/common/roles.go +++ b/common/roles.go @@ -95,7 +95,7 @@ func ValidateRole(c *gin.Context, model ModelName, action CRUD) error { // of invalid role return an error. // Get user's role from context - role, exists := c.Get("user_role") + role, exists := c.Get(UserRoleCtx) if !exists { return fmt.Errorf("Request does not contain user's role") }