mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-24 06:48:35 +02:00
wip: UI refactoring
* fixed an issue with the FETCH responses parser * Aliases are now displayed into *identities* * French translation update see #204
This commit is contained in:
@@ -49,7 +49,7 @@ def graphs(request):
|
||||
graphs_loc=parameters.get_admin("GRAPHS_LOCATION"))
|
||||
if view == "global":
|
||||
if not request.user.is_superuser:
|
||||
raise PermDeniedException(_("you're not allowed to see those statistics"))
|
||||
raise PermDeniedException
|
||||
tplvars.update(domain=view)
|
||||
else:
|
||||
try:
|
||||
@@ -57,7 +57,7 @@ def graphs(request):
|
||||
except Domain.DoesNotExist:
|
||||
raise ModoboaException(_("Domain not found. Please enter a full name"))
|
||||
if not request.user.can_access(domain):
|
||||
raise PermDeniedException(_("You don't have access to this domain"))
|
||||
raise PermDeniedException
|
||||
tplvars.update(domain=domain.name)
|
||||
|
||||
if period == "custom":
|
||||
|
||||
@@ -102,6 +102,9 @@ def parse_fetch_response(data):
|
||||
while cpt < len(data):
|
||||
content = ()
|
||||
while cpt < len(data) and data[cpt] != ')':
|
||||
if type(data[cpt]) == str:
|
||||
# FIXME : probably an unsolicited response
|
||||
continue
|
||||
content += data[cpt]
|
||||
cpt += 1
|
||||
cpt += 1
|
||||
|
||||
Reference in New Issue
Block a user