Commit 3d5703ac authored by Antoine Bernard's avatar Antoine Bernard

Déplacement de la listes des pages existantes vers note-kfet-2015-django/note/settings.py.

parent 5ce9e92b
......@@ -161,7 +161,7 @@ def login_NK(request, username, password, form, masque=[[], [], False]):
request.session["logged"] = "ok"
# On demande au serveur quelles sont les pages auxquelles on a le droit d'accéder
try:
sock.write(json.dumps(["django_get_accessible_pages"]))
sock.write(json.dumps(["django_get_accessible_pages", settings.EXISTING_PAGES]))
out = full_read(sock)
if _is_success_code(out["retcode"]):
pages = [i for i in out["msg"] if i[0]!="Index"] # On ignore la page d'index, inutile car le lien est déjà là
......
......@@ -289,4 +289,15 @@ ACL_MASKS = {
_acl_masks_keys = ACL_MASKS.keys()
_acl_masks_keys.sort()
# Liste rencensant les tuples des pages existantes sous le format
# (nom, adresse, droit)
EXISTING_PAGES = [("Index", "index", "login"),
("Consos", "consos", "consos"),
("Comptes", "comptes", "search"),
("Activités", "activites", "activites"),
("Boutons", "boutons", "boutons"),
("Inscriptions", "inscriptions", "inscriptions"),
("Virements", "virements", "dons"),
("Trésorerie","tresorerie","tresorerie"),
("WEI", "wei", "wei"),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment