mirror of
https://github.com/optim-enterprises-bv/databunker.git
synced 2025-10-30 01:22:28 +00:00
fix event titles
This commit is contained in:
@@ -14,8 +14,9 @@ func (e mainEnv) agreementAccept(w http.ResponseWriter, r *http.Request, ps http
|
||||
identity := ps.ByName("identity")
|
||||
brief := ps.ByName("brief")
|
||||
mode := ps.ByName("mode")
|
||||
event := audit("agreement accept for "+brief, identity, mode, identity)
|
||||
event := audit("accept agreement for "+brief, identity, mode, identity)
|
||||
defer func() { event.submit(e.db, e.conf) }()
|
||||
|
||||
if validateMode(mode) == false {
|
||||
returnError(w, r, "bad mode", 405, nil, event)
|
||||
return
|
||||
@@ -127,7 +128,7 @@ func (e mainEnv) agreementWithdraw(w http.ResponseWriter, r *http.Request, ps ht
|
||||
identity := ps.ByName("identity")
|
||||
brief := ps.ByName("brief")
|
||||
mode := ps.ByName("mode")
|
||||
event := audit("consent withdraw for "+brief, identity, mode, identity)
|
||||
event := audit("withdraw agreement for "+brief, identity, mode, identity)
|
||||
defer func() { event.submit(e.db, e.conf) }()
|
||||
|
||||
if validateMode(mode) == false {
|
||||
@@ -199,8 +200,7 @@ func (e mainEnv) agreementWithdraw(w http.ResponseWriter, r *http.Request, ps ht
|
||||
if selfService == false {
|
||||
// user can change consent only for briefs defined in self-service
|
||||
if len(authResult) == 0 {
|
||||
authResult = e.enforceAuth(w, r, event)
|
||||
if authResult == "" {
|
||||
if e.enforceAdmin(w, r) == "" {
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -241,6 +241,9 @@ func (e mainEnv) agreementRevokeAll(w http.ResponseWriter, r *http.Request, ps h
|
||||
if authResult == "" {
|
||||
return
|
||||
}
|
||||
if e.enforceAdmin(w, r) == "" {
|
||||
return
|
||||
}
|
||||
brief = normalizeBrief(brief)
|
||||
if isValidBrief(brief) == false {
|
||||
returnError(w, r, "bad brief format", 405, nil, nil)
|
||||
|
||||
Reference in New Issue
Block a user