Explorar el Código

Fix Staff condition for non logged people

master
tr4ck3ur des JM2L hace 9 años
padre
commit
631ee048e9
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. +2
    -2
      jm2l/templates/list_tiers.mako
  2. +2
    -2
      jm2l/templates/view_tiers.mako

+ 2
- 2
jm2l/templates/list_tiers.mako Ver fichero

@@ -39,7 +39,7 @@
<strong>
<a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}">${entity.name}</a>
</strong>
% if request.user.Staff:
% if request.user and request.user.Staff:
<span style="float:right;">
<a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}/edit">edit</a>
</span>
@@ -54,4 +54,4 @@
</div>

</div>
</div>
</div>

+ 2
- 2
jm2l/templates/view_tiers.mako Ver fichero

@@ -16,7 +16,7 @@ ${The_entity_type.entity_subtype}
%if entity.tiers_id:
<a href="http://jm2l.linux-azur.org/node/${entity.tiers_id}">Link</a> -
%endif
% if (request.user.Staff or request.user in entity.members):
% if request.user and (request.user.Staff or request.user in entity.members):
<a href="/entity/${entity.get_entity_type.entity_type}/${entity.slug}/edit">Editer</a>
% endif
<div clear='both'></div>
@@ -93,4 +93,4 @@ ${The_entity_type.entity_subtype}
<hr/>

</div>
</div>
</div>

Cargando…
Cancelar
Guardar