mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-14 05:58:58 +00:00
feat: Add audit logging (#38189)
Co-authored-by: bircni <bircni@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -12,7 +12,13 @@ import (
|
||||
"gitea.dev/modules/setting"
|
||||
)
|
||||
|
||||
const ContextDataKeySignedUser = "SignedUser"
|
||||
const (
|
||||
ContextDataKeySignedUser = "SignedUser"
|
||||
// ContextDataKeyImpersonator holds the admin acting as the signed-in user, if any.
|
||||
ContextDataKeyImpersonator = "Impersonator"
|
||||
// ContextDataKeyAuthCredential names the credential the request authenticated with, e.g. "access-token:42".
|
||||
ContextDataKeyAuthCredential = "AuthCredential"
|
||||
)
|
||||
|
||||
func GetContextData(c context.Context) reqctx.ContextData {
|
||||
if rc := reqctx.GetRequestDataStore(c); rc != nil {
|
||||
|
||||
Reference in New Issue
Block a user