mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-07-03 22:45:01 +00:00
Administrators can change user email address
This commit is contained in:
@ -15,6 +15,7 @@ pub enum AdminAction {
|
||||
AddAdminRole { target: AdminID, role: String },
|
||||
RemoveAdminRole { target: AdminID, role: String },
|
||||
AccessUserPage { user_id: UserID, user_name: String },
|
||||
ChangedEmailAddress { user_id: UserID, user_name: String, old_mail: String, new_mail: String },
|
||||
UnsupportedAction { raw_data: String },
|
||||
}
|
||||
|
||||
@ -47,7 +48,11 @@ impl AdminAction {
|
||||
AdminAction::RemoveAdminRole { .. } =>
|
||||
{ "Removed a role from [admin]{target}[/admin] => {role}" }
|
||||
|
||||
AdminAction::AccessUserPage { .. } => { "Administrator accessed information of user #{user_id} '{user_name}'." }
|
||||
AdminAction::AccessUserPage { .. } =>
|
||||
{ "Accessed information of user #{user_id} '{user_name}'." }
|
||||
|
||||
AdminAction::ChangedEmailAddress { .. } =>
|
||||
{ "Changed email address of user #{user_id} '{user_name}' from {old_mail} to {new_mail}" }
|
||||
|
||||
AdminAction::UnsupportedAction { .. } => { "Unsupported action. Raw data: {raw_data}" }
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ use crate::utils::user_data_utils::user_data_url;
|
||||
///! User information
|
||||
///!
|
||||
///! @author Pierre Hubert
|
||||
#[derive(Clone, PartialEq, Eq, Debug)]
|
||||
#[derive(Clone, PartialEq, Eq, Debug, Copy)]
|
||||
pub struct UserID(u64);
|
||||
|
||||
impl UserID {
|
||||
|
Reference in New Issue
Block a user