Skip to content

Commit

Permalink
Merge pull request #324 from jmpsec/more-unit-tests
Browse files Browse the repository at this point in the history
Unit test for users
  • Loading branch information
javuto authored Nov 20, 2022
2 parents c32a44e + 1c7c1ef commit 010ec9e
Show file tree
Hide file tree
Showing 3 changed files with 728 additions and 14 deletions.
2 changes: 1 addition & 1 deletion users/permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (m *UserManager) ChangePermission(username, environment string, perm UserPe
return fmt.Errorf("user %s does not exist", username)
}
if perm.Username != username || perm.Environment != environment {
return fmt.Errorf("username/envioronment mismatch [%s/%s]", username, environment)
return fmt.Errorf("username/environment mismatch [%s/%s]", username, environment)
}
m.DB.Model(&perm).Updates(map[string]interface{}{
"access_type": perm.AccessType,
Expand Down
Loading

0 comments on commit 010ec9e

Please sign in to comment.