pub enum UserRole {
Show 15 variants
SuperAdmin,
Syndic,
Accountant,
AccountantEncodeur,
AccountantEmetteur,
BoardMember,
Contractor,
Owner,
CommunityModerator,
Lawyer,
Notary,
Amo,
Architect,
Bet,
Warden,
}Expand description
Roles métier KoproGo.
Story 3.1 — Sous-rôles métier (FR21 — séparation des pouvoirs comptables). L’enum distingue :
Accountant(générique, conservé pour compatibilité — encodeur + émetteur)AccountantEncodeur(saisie comptable amont : Invoice / Quote uniquement)AccountantEmetteur(sortie financière : Expense / CallForFunds uniquement)CommunityModerator(modération SEL, sondages, panneau d’affichage)- Mandataires / spécialistes : Lawyer, Notary, Amo, Architect, Bet, Warden
INV-10 (séparation des pouvoirs) : un encodeur ne peut pas émettre, un émetteur
ne peut pas encoder. Le cumul des deux rôles passe par DEUX assignments
(cf. UserRoleAssignment).
Variants§
SuperAdmin
Syndic
Accountant
Comptable générique (rétrocompat — possède encodeur + émetteur).
AccountantEncodeur
Comptable encodeur — saisie comptable amont (facture, devis).
AccountantEmetteur
Comptable émetteur — sortie financière (charges, appels de fonds).
BoardMember
Contractor
Owner
CommunityModerator
Modérateur communauté (SEL, sondages, notices).
Lawyer
Avocat (conseil juridique de la copro).
Notary
Notaire.
Amo
Assistant Maître d’Ouvrage (AMO).
Architect
Architecte.
Bet
Bureau d’études techniques (BET).
Warden
Concierge / gardien.
Implementations§
Source§impl UserRole
impl UserRole
Sourcepub fn can_encode_invoices(&self) -> bool
pub fn can_encode_invoices(&self) -> bool
Peut saisir une facture / devis (entrée comptable amont).
INV-10 : seuls encodeurs comptables + syndic + superadmin (les syndics gardent la pleine autorité en l’absence de comptable dédié).
Sourcepub fn can_emit_expenses(&self) -> bool
pub fn can_emit_expenses(&self) -> bool
Peut émettre une charge (sortie financière).
INV-10 : seuls émetteurs comptables + syndic + superadmin.
Un AccountantEncodeur SEUL ne peut PAS émettre — il faut un
AccountantEmetteur (ou cumul des deux assignments).
Sourcepub fn can_create_call_for_funds(&self) -> bool
pub fn can_create_call_for_funds(&self) -> bool
Peut créer un appel de fonds.
Même règle que can_emit_expenses : c’est une sortie financière.
Sourcepub fn can_moderate_community(&self) -> bool
pub fn can_moderate_community(&self) -> bool
Peut modérer la communauté (SEL, sondages, panneau d’affichage).
Sourcepub fn is_accountant(&self) -> bool
pub fn is_accountant(&self) -> bool
Casquette comptable — générique ou sous-rôle encodeur/émetteur.
Story 5.5 (FR28/FR30, INV-6) : le comptable est un prestataire, pas un
copropriétaire. community_access_guard s’appuie sur ce prédicat pour
exclure les DEUX sous-rôles des routes communautaires — sauf cumul
d’un rôle Owner distinct (cf. ADR 0052).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UserRole
impl<'de> Deserialize<'de> for UserRole
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for UserRole
impl StructuralPartialEq for UserRole
Auto Trait Implementations§
impl Freeze for UserRole
impl RefUnwindSafe for UserRole
impl Send for UserRole
impl Sync for UserRole
impl Unpin for UserRole
impl UnsafeUnpin for UserRole
impl UnwindSafe for UserRole
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more