mirror of
https://git.rwth-aachen.de/acs/public/villas/web-backend-go/
synced 2025-03-30 00:00:12 +01:00
user var name instead of absolute value
This commit is contained in:
parent
ac9e564bc8
commit
744dd7dac9
1 changed files with 1 additions and 1 deletions
|
@ -95,7 +95,7 @@ func ValidateRole(c *gin.Context, model ModelName, action CRUD) error {
|
||||||
// of invalid role return an error.
|
// of invalid role return an error.
|
||||||
|
|
||||||
// Get user's role from context
|
// Get user's role from context
|
||||||
role, exists := c.Get("user_role")
|
role, exists := c.Get(UserRoleCtx)
|
||||||
if !exists {
|
if !exists {
|
||||||
return fmt.Errorf("Request does not contain user's role")
|
return fmt.Errorf("Request does not contain user's role")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue