[gen] Bugfix: one could authentify with a ldap user even if ldap.enabled was False.

This commit is contained in:
Gaetan Delannay 2015-01-21 14:30:42 +01:00
parent 30dbcb7dc7
commit 307f4e152e
5 changed files with 17 additions and 15 deletions

View file

@ -603,7 +603,7 @@ class ToolWrapper(AbstractWrapper):
<input type="hidden" name="className" value=":className"/>
<input if="refInfo" type="hidden" name="ref" value=":refInfo"/>
<table width="100%">
<table class="searchFields">
<tr for="searchRow in ztool.getGroupedSearchFields(searchInfo)"
valign="top">
<td for="field in searchRow" class="search"
@ -617,11 +617,9 @@ class ToolWrapper(AbstractWrapper):
</table>
<!-- Submit button -->
<p align=":dright"><br/>
<input var="label=_('search_button');
css=ztool.getButtonCss(label, small=False)" type="submit"
class=":css" value=":label" style=":url('search', bg=True)"/>
</p>
<input var="label=_('search_button');
css=ztool.getButtonCss(label, small=False)" type="submit"
class=":css" value=":label" style=":url('search', bg=True)"/>
</form>
</x>''', template=AbstractWrapper.pxTemplate, hook='content')

View file

@ -1244,7 +1244,9 @@ class AbstractWrapper(object):
o = self.o
workflow = o.getWorkflow()
for name in dir(workflow):
if getattr(workflow, name).__class__.__name__ != 'State': continue
state = getattr(workflow, name)
if state.__class__.__name__ != 'State': continue
if state.isIsolated(workflow) : continue
res.append((name, o.translate(o.getWorkflowLabel(name))))
return res