ó
?ü½cc           @   s   d  Z  d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d e	 f d „  ƒ  YZ
 d	 d d
 „ Z d S(   sg   Common routines for logging in and logging out of the list administrator
and list moderator interface.
iÿÿÿÿ(   t   mm_cfg(   t   Utils(   t   Errors(   t   FontAttr(   t   _t   NotLoggedInErrorc           B   s   e  Z d  Z d „  Z RS(   s9   Exception raised when no matching admin cookie was found.c         C   s   t  j |  | ƒ | |  _ d  S(   N(   t	   Exceptiont   __init__t   message(   t   selfR   (    (    s/   /export/web/mailman/mailman/Mailman/Cgi/Auth.pyR      s    (   t   __name__t
   __module__t   __doc__R   (    (    (    s/   /export/web/mailman/mailman/Mailman/Cgi/Auth.pyR      s   t    c         C   sä   |  j  | ƒ } | r | } n t j | ƒ } | rY t | d d d d ƒj ƒ  } d GHn  | d k rt t d ƒ } n t d ƒ } t j |  j ƒ } d	 | d
 GHt j d i |  j	 d 6| d 6| d 6| d 6d |  ƒGH|  j
 ƒ  GHd  S(   Nt   colors   #ff0000t   sizes   +1s   Status: 401 Unauthorizedt   admindbt	   Moderatort   Administrators!   Content-type: text/html; charset=s   

s   admlogin.htmlt   listnamet   pathR   t   whot   mlist(   t   GetScriptURLR   t   GetRequestURIR   t   FormatR   t
   GetCharSett   preferred_languaget   maketextt	   real_namet   GetMailmanFooter(   R   t
   scriptnamet   msgt	   frontpaget   urlt	   actionurlR   t   charset(    (    s/   /export/web/mailman/mailman/Mailman/Cgi/Auth.pyt	   loginpage%   s(    	
N(   R   t   MailmanR    R   R   t   Mailman.htmlformatR   t   Mailman.i18nR   R   R   t   NoneR%   (    (    (    s/   /export/web/mailman/mailman/Mailman/Cgi/Auth.pyt   <module>   s   