U
     e                     @   sJ   d dl mZmZmZ d dlZd dlmZ d dlT G dd dej	j
eZdS )    )requestredirectmake_responseN)ResponseMixin)*c                   @   s    e Zd ZdZejjdd ZdS )SignOutViewz/signoutc              
   C   s   t jjrt jrzt jjrzt jjddg tjr6tj}ntj	}t jjj
dkrft jjt j| t|}qt jjt j|}qttj	 d}nttj	 d}tjjdddd	t jjt jjt jd
d | |S )Nr   zplugin.*Zkeycloakz/auth/signinz/servicedesk/auth/signinlogoutZCmfAuthokT   )ZoperateZcmf_model_nameZresult_statusZcurrent_transactionparent_nameZparent_codeparentZsecurity_level)gZcurrent_personZ
user_localZsessionZpluginZload_fieldsr   ZreferrerZconfigZAUTH_SERVER_URLZapp_typer   r   ZmodelsZCmfAuditZaudit_eventZcurrent_userZloginZ_ok)selfZnext_urlZresponse r   ./modules/auth/views/signout.pyget   s*    

   zSignOutView.getN)__name__
__module____qualname__Z__url__cmfviewsactionr   r   r   r   r   r      s   r   )Zflaskr   r   r   Z	cmf.viewsr   Zmodules.auth.views.responser   Zcmf.includer   ZBaseViewr   r   r   r   r   <module>   s   