allow kojiweb login to be disabled
Signed-off-by: Dennis Gilmore <dennis@ausil.us>
This commit is contained in:
parent
829278f2b5
commit
e35d2b4cef
3 changed files with 11 additions and 1 deletions
|
|
@ -92,12 +92,15 @@ $localnav
|
|||
</div><!-- end mainNav -->
|
||||
|
||||
<span id="loginInfo">
|
||||
$koji.formatTimeLong($currentDate) |
|
||||
$koji.formatTimeLong($currentDate)
|
||||
#if not $LoginDisabled
|
||||
|
|
||||
#if $currentUser
|
||||
$greeting(), <a href="userinfo?userID=$currentUser.id">$currentUser.name</a> | <a href="logout">logout</a>
|
||||
#else
|
||||
<a href="login">login</a>
|
||||
#end if
|
||||
#end if
|
||||
</span>
|
||||
|
||||
<div id="content">
|
||||
|
|
|
|||
|
|
@ -86,6 +86,8 @@ class Dispatcher(object):
|
|||
|
||||
['Secret', 'string', None],
|
||||
|
||||
['LoginDisabled', 'boolean', False],
|
||||
|
||||
['LibPath', 'string', '/usr/share/koji-web/lib'],
|
||||
|
||||
['LogLevel', 'string', 'WARNING'],
|
||||
|
|
|
|||
|
|
@ -133,6 +133,11 @@ def _genHTML(environ, fileName):
|
|||
environ['koji.values']['winEnabled'] = environ['koji.session'].winEnabled()
|
||||
else:
|
||||
environ['koji.values']['winEnabled'] = False
|
||||
if not environ['koji.values'].has_key('LoginDisabled'):
|
||||
if 'koji.options' in environ:
|
||||
environ['koji.values']['LoginDisabled'] = environ['koji.options']['LoginDisabled']
|
||||
else:
|
||||
environ['koji.values']['LoginDisabled'] = False
|
||||
|
||||
tmpl_class = TEMPLATES.get(fileName)
|
||||
if not tmpl_class:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue