landed sysadmin user account management

This commit is contained in:
2026-02-17 21:45:16 -07:00
parent a9bbbcb6b5
commit 4f26dd3295
13 changed files with 440 additions and 38 deletions
+6 -1
View File
@@ -120,7 +120,7 @@ func (ci *ContactInfo) FullName(ps bool) string {
* true if the E-mail address on this account has been changed, false if not.
* Standard Go error status.
*/
func (ci *ContactInfo) Save(ctx context.Context) (bool, error) {
func (ci *ContactInfo) Save(ctx context.Context, changer *User, ipaddr string) (bool, error) {
ci.Mutex.Lock()
defer ci.Mutex.Unlock()
@@ -189,6 +189,11 @@ func (ci *ContactInfo) Save(ctx context.Context) (bool, error) {
if err != nil {
return false, err
}
if ci.OwnerCommId < 0 {
if changer.Uid != ci.OwnerUid {
AmStoreAudit(AmNewAudit(AuditAdminSetUserContactInfo, changer.Uid, ipaddr, fmt.Sprintf("uid=%d", ci.OwnerUid), fmt.Sprintf("contactid=%d", ci.ContactId)))
}
}
return emailChange, err
}