feat: record admin and redeem audit events
This commit is contained in:
@@ -8,6 +8,10 @@ import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
func (a *App) audit(operator uint, action, targetType, targetID, metadata string) {
|
||||
_ = a.db.Create(&AuditLog{OperatorID: operator, Action: action, TargetType: targetType, TargetID: targetID, Metadata: metadata}).Error
|
||||
}
|
||||
|
||||
func defaultPermissions(role string) []string {
|
||||
if role == RolePrivileged {
|
||||
return []string{PermDownload, PermRedeem, PermWebDAV, PermWebDAVConfig}
|
||||
|
||||
Reference in New Issue
Block a user