Skip to content
Snippets Groups Projects
Commit 4e9dde42 authored by Jan Semmelink's avatar Jan Semmelink
Browse files

Fix bug in service/context audit function

parent 59f1ff43
No related branches found
No related tags found
No related merge requests found
...@@ -214,8 +214,9 @@ func (ctx *serviceContext) ValueOrDefault(name string, defaultValue interface{}) ...@@ -214,8 +214,9 @@ func (ctx *serviceContext) ValueOrDefault(name string, defaultValue interface{})
} }
func (ctx *serviceContext) AuditChange(eventType string, orgValue, newValue interface{}) { func (ctx *serviceContext) AuditChange(eventType string, orgValue, newValue interface{}) {
username, _ := ctx.Claim()["username"].(string)
event, err := audit.NewEvent( event, err := audit.NewEvent(
ctx.Claim()["username"].(string), //use username as source (will default to "SYSTEM" if undefined) username, //use username as source (will default to "SYSTEM" if undefined)
eventType, eventType,
orgValue, orgValue,
newValue, newValue,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment