mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 23:28:39 +03:00
refactor custom actions
SFTPGo is now fully auditable, all fs and provider events that change something are notified and can be collected using hooks/plugins. There are some backward incompatible changes for command hooks
This commit is contained in:
@@ -249,6 +249,7 @@ func (u *User) PrepareForRendering() {
|
||||
}
|
||||
}
|
||||
|
||||
// HasRedactedSecret returns true if the user has a redacted secret
|
||||
func (u *User) hasRedactedSecret() bool {
|
||||
if u.FsConfig.HasRedactedSecret() {
|
||||
return true
|
||||
@@ -1109,17 +1110,6 @@ func (u *User) getACopy() User {
|
||||
}
|
||||
}
|
||||
|
||||
func (u *User) getNotificationFieldsAsSlice(action string) []string {
|
||||
return []string{action, u.Username,
|
||||
strconv.FormatInt(u.ID, 10),
|
||||
strconv.FormatInt(int64(u.Status), 10),
|
||||
strconv.FormatInt(u.ExpirationDate, 10),
|
||||
u.HomeDir,
|
||||
strconv.FormatInt(int64(u.UID), 10),
|
||||
strconv.FormatInt(int64(u.GID), 10),
|
||||
}
|
||||
}
|
||||
|
||||
// GetEncryptionAdditionalData returns the additional data to use for AEAD
|
||||
func (u *User) GetEncryptionAdditionalData() string {
|
||||
return u.Username
|
||||
|
||||
Reference in New Issue
Block a user