some permission problems

This commit is contained in:
Oskar Hahn 2012-04-15 12:52:59 +02:00
parent ae5c6b84a8
commit 6f0fd91ec2
3 changed files with 4 additions and 4 deletions

View File

@ -72,6 +72,8 @@
<a href="{% url application_poll_delete poll.id %}"> <a href="{% url application_poll_delete poll.id %}">
<img src="{% static 'images/icons/edit-delete.png' %}" title="{% trans 'Delete Vote' %}"> <img src="{% static 'images/icons/edit-delete.png' %}" title="{% trans 'Delete Vote' %}">
</a> </a>
{% elif poll.has_votes %}
<b>{{ forloop.counter }}. {% trans "Vote" %}:</b>
{% endif %} {% endif %}
<br> <br>
{% if poll.has_votes %} {% if poll.has_votes %}

View File

@ -681,7 +681,6 @@ class ApplicationPDF(PDFView):
data.append([cell3a,cell3b]) data.append([cell3a,cell3b])
poll_results = application.get_poll_results() poll_results = application.get_poll_results()
print poll_results
# voting results # voting results
if poll_results: if poll_results:
cell4a = [] cell4a = []

View File

@ -52,8 +52,8 @@ import settings
from utils import render_to_forbitten from utils import render_to_forbitten
from openslides.utils.signals import template_manipulation from openslides.utils.signals import template_manipulation
from pdf import firstPage, laterPages from pdf import firstPage, laterPages
from config.models import config
import settings
NO_PERMISSION_REQUIRED = 'No permission required' NO_PERMISSION_REQUIRED = 'No permission required'
@ -276,10 +276,9 @@ class FrontPage(TemplateView):
tab = mod.register_tab(self.request) tab = mod.register_tab(self.request)
except (ImportError, AttributeError): except (ImportError, AttributeError):
continue continue
if self.request.user.has_perm(tab.permission): if tab.permission:
apps.append(tab) apps.append(tab)
context['apps'] = apps context['apps'] = apps
#context['wellcome_text'] = config['wellcome_text']
return context return context