application: auth bounded context (register, login)
This commit is contained in:
@@ -85,6 +85,13 @@ impl User {
|
||||
pub fn created_at(&self) -> DateTime<Utc> {
|
||||
self.created_at
|
||||
}
|
||||
|
||||
// -- Mutations --
|
||||
|
||||
/// Promote this user to admin.
|
||||
pub fn promote_to_admin(&mut self) {
|
||||
self.is_admin = true;
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user