+
    ²gjü  ã                  ó¤  € ^ RI Ht ^ RIHt ^ RIHtHtHtHt ^ RI	H
t
 ^ RIHtHt ^ RIHtHtHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHtHtHtHt ]! ]! ]! ]P>                  4      4      .R7      t ] PC                  R]"],          R7      R R l4       t#] PI                  R]R7      R R l4       t%] PM                  R]R7      R R l4       t'R# )é    )Úannotations)Ú	Annotated)Ú	APIRouterÚDependsÚHTTPExceptionÚstatus)ÚSession)Úget_current_userÚrequire_roles)ÚLanguageÚget_languageÚ	translate)Úget_password_hash)Úget_db)ÚRole)ÚUser)ÚFUNCTIONALITY_KEYSÚ
UserCreateÚUserReadÚ
UserUpdate)ÚdependenciesÚ )Úresponse_modelc               ó   € V ^8„  d   QhRR/# )é   Údbú#Annotated[Session, Depends(get_db)]© )Úformats   "Ú+/var/www/html/proc/backend/app/api/users.pyÚ__annotate__r!      s   € ÷ 8ñ 8Ð6ñ 8ó    c                ó‚   € V P                  \        4      P                  \        P                  4      P	                  4       # )N)Úqueryr   Úorder_byÚusernameÚall)r   s   &r    Ú
list_usersr(      s(   € à�8‰8”D‹>×"Ñ"¤4§=¡=Ó1×5Ñ5Ó7Ð7r"   c               ó$   € V ^8„  d   QhRRRRRR/# )r   Úpayloadr   r   r   Úlanguageú*Annotated[Language, Depends(get_language)]r   )r   s   "r    r!   r!      s&   € ÷ ñ Øðà+ðð 9ñr"   c                óÊ  € V P                   eJ   \        V P                   4      P                  \        4      '       g   \	        \
        P                  RR7      hVP                  \        4      P                  \        P                  V P                  8H  4      P                  4       '       d&   \	        \
        P                  \        RV4      R7      h\        V P                  V P                  V P                  V P                   V P"                  V P                   \%        V P&                  4      R7      pVP)                  V4       VP+                  4        VP-                  V4       V# )NúUnknown functionality access©Ústatus_codeÚdetailúusers.username_exists)r&   Ú	full_nameÚemailÚroleÚ	is_activeÚfunctionality_accessÚhashed_password)r7   ÚsetÚissubsetr   r   r   ÚHTTP_422_UNPROCESSABLE_ENTITYr$   r   Úfilterr&   ÚfirstÚHTTP_409_CONFLICTr   r3   r4   r5   r6   r   ÚpasswordÚaddÚcommitÚrefresh)r*   r   r+   Úusers   &&& r    Úcreate_userrD      sþ   € ð ×#Ñ#Ò/¼¸G×<XÑ<XÓ8Y×8bÑ8bÔcu×8vÒ8vÜ¬×(LÑ(LÐUsÔtÐtØ	‡x�x”ƒ~×ÑœTŸ]™]¨g×.>Ñ.>Ñ>Ó?×EÑE×GÒGÜ¬×(@Ñ(@ÌÐSjÐltÓIuÔvÐvÜØ×!Ñ!Ø×#Ñ#Ø�m‰mØ�\‰\Ø×#Ñ#Ø$×9Ñ9Ü)¨'×*:Ñ*:Ó;ô€Dð ‡F�Fˆ4„LØ‡I�I„KØ‡J�JˆtÔØ€Kr"   z
/{user_id}c          
     ó,   € V ^8„  d   QhRRRRRRRRR	R
/# )r   Úuser_idÚintr*   r   r   r   r+   r,   Úcurrent_adminz*Annotated[User, Depends(get_current_user)]r   )r   s   "r    r!   r!   1   s:   € ÷ ñ Øðàðð 	,ðð 9ð	ð
 >ñr"   c                óŒ  € VP                  \        V 4      pV'       g   \        R \        RV4      R7      hVP                  VP                  8X  dt   VP
                  e;   VP
                  \        P                  8w  d   \        \        P                  RR7      hVP                  RJ d   \        \        P                  RR7      hVP                  '       d”   VP                  VP                  8w  dy   VP                  \        4      P                  \        P                  VP                  8H  4      P                  4       '       d&   \        \        P                  \        RV4      R7      hVP                   eJ   \#        VP                   4      P%                  \&        4      '       g   \        \        P(                  RR7      hVP+                  RR	0R
7      P-                  4        F  w  rg\/        WVV4       K  	  VP0                  '       d   \3        VP0                  4      Vn        VP7                  4        VP9                  V4       V# )i”  zusers.not_foundr/   z%You cannot remove your own admin roleFz&You cannot deactivate your own accountr2   r.   Tr?   )Úexclude_unsetÚexclude)Úgetr   r   r   Úidr5   r   Úadminr   ÚHTTP_400_BAD_REQUESTr6   r&   r$   r<   r=   r>   r7   r9   r:   r   r;   Ú
model_dumpÚitemsÚsetattrr?   r   r8   rA   rB   )rF   r*   r   r+   rH   rC   ÚkeyÚvalues   &&&&&   r    Úupdate_userrU   0   sŸ  € ð �6‰6”$˜Ó €DßÜ¨´IÐ>OÐQYÓ4ZÔ[Ð[Ø‡w�w�-×"Ñ"Ô"Ø�<‰<Ò#¨¯©¼¿
¹
Ô(BÜ¬F×,GÑ,GÐPwÔxÐxØ×Ñ Ó%Ü¬F×,GÑ,GÐPxÔyÐyØ××Ð˜G×,Ñ,°·±Ô=Ø�8‰8”D‹>× Ñ ¤§¡°'×2BÑ2BÑ!BÓC×IÑI×KÒKÜ¬F×,DÑ,DÌYÐWnÐpxÓMyÔzÐzØ×#Ñ#Ò/¼¸G×<XÑ<XÓ8Y×8bÑ8bÔcu×8vÒ8vÜ¬×(LÑ(LÐUsÔtÐtØ×(Ñ(°tÀjÀ\Ð(ÓR×XÑXÖZ‰
ˆÜ�˜5Ö!ñ [à××ÐÜ0°×1AÑ1AÓBˆÔØ‡I�I„KØ‡J�JˆtÔØ€Kr"   N)(Ú
__future__r   Útypingr   Úfastapir   r   r   r   Úsqlalchemy.ormr	   Úapp.api.depsr
   r   Úapp.core.i18nr   r   r   Úapp.core.securityr   Úapp.db.sessionr   Úapp.models.enumsr   Úapp.models.userr   Úapp.schemas.userr   r   r   r   rN   ÚrouterrL   Úlistr(   ÚpostrD   ÚputrU   r   r"   r    Ú<module>re      s±   ðÝ "Ý ç =Ó =Ý "ç 8ß ;Ñ ;Ý /Ý !Ý !Ý  ß QÓ Qá	¡©°t·z±zÓ)BÓ!CÐ DÔ	E€ð ‡�ˆB˜t H�~€Ó.ô8ó /ð8ð ‡�ˆR €Ó)ôó *ðð0 ‡�ˆL¨€Ó2ôó 3òr"   