Skip to main content

sova_auth/
feature.rs

1//! Feature flags (Laravel Fortify-style).
2
3#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
4pub enum Feature {
5    Registration,
6    ResetPasswords,
7    EmailVerification,
8    UpdateProfile,
9    UpdatePasswords,
10    TwoFactor,
11    Roles,
12}
13
14impl Feature {
15    pub fn all() -> &'static [Feature] {
16        &[
17            Feature::Registration,
18            Feature::ResetPasswords,
19            Feature::EmailVerification,
20            Feature::UpdateProfile,
21            Feature::UpdatePasswords,
22            Feature::TwoFactor,
23            Feature::Roles,
24        ]
25    }
26}