mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-09-25 22:29:45 +00:00
Create password policy
This commit is contained in:
@@ -59,6 +59,25 @@ pub mod database_tables_names {
|
||||
pub const NOTIFICATIONS_TABLE: &str = "comunic_notifications";
|
||||
}
|
||||
|
||||
/// Password policy
|
||||
pub mod password_policy {
|
||||
/// Allow email in password ?
|
||||
pub const ALLOW_EMAIL_IN_PASSWORD: bool = false;
|
||||
|
||||
/// Allow user name in password ?
|
||||
pub const ALLOW_NAME_IN_PASSWORD: bool = false;
|
||||
|
||||
/// Minimal length of password
|
||||
pub const MIN_PASSWORD_LENGTH: u64 = 8;
|
||||
|
||||
/// Password composition policy
|
||||
pub const MIN_NUMBER_LOWERCASE_LETTER: u64 = 1;
|
||||
pub const MIN_NUMBER_UPPERCASE_LETTER: u64 = 1;
|
||||
pub const MIN_NUMBER_DIGITS: u64 = 1;
|
||||
pub const MIN_NUMBER_SPECIAL_CHARACTERS: u64 = 1;
|
||||
pub const MIN_CATEGORIES_PRESENCE: u64 = 2;
|
||||
}
|
||||
|
||||
/// Minimal conversation policy
|
||||
pub mod conservation_policy {
|
||||
use std::time::Duration;
|
||||
|
Reference in New Issue
Block a user