Show
Ignore:
Timestamp:
05/03/08 18:58:06 (16 years ago)
Author:
jerome
Message:

Moved new method around.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/utils.py

    r3366 r3367  
    3131from pykota.errors import PyKotaCommandLineError 
    3232 
    33 def onlyAdmin(app, restricted=True) : 
    34     """Raises an exception if the user is not a PyKota administrator.""" 
    35     if restricted and not app.config.isAdmin : 
    36         raise PyKotaCommandLineError, "%s : %s" % (pwd.getpwuid(os.geteuid())[0], _("You're not allowed to use this command.")) 
    37          
    3833def initlocale(lang="", cset=None) : 
    3934    """Initializes the locale stuff."""