Bug #7366
expose /manage/ backoffice menu entries in jsonp
Start date:
26 May 2015
Due date:
% Done:
0%
Estimated time:
Patch proposed:
Yes
Planning:
Description
For sidepage integration with our other apps, authentic should respond on /manage/menu.json(?callback=whatever) with such a content:
test([ {"url": "http://authentic/manage/organizational-units/", "icon": "ou", "slug": "ou", "label": "Organizational Units"}, {"url": "http://authentic/manage/users/", "icon": "users", "slug": "users", "label": "Users"}, {"url": "http://authentic/manage/roles/", "icon": "roles", "slug": "forms", "label": "Roles"} ]);
(of course it should only contain those that are accessible to the user).
Files
Related issues
Associated revisions
History
Updated by Frédéric Péters over 8 years ago
- Related to Development #7163: Rendre le menu déroulant Publik contextuel + Wording added
Updated by Frédéric Péters over 8 years ago
- Subject changed from expose /manager backoffice menu entries in jsonp to expose /manage/ backoffice menu entries in jsonp
- Description updated (diff)
Updated by Frédéric Péters over 8 years ago
- Assignee changed from Benjamin Dauvergne to Frédéric Péters
I'll get to it.
Updated by Frédéric Péters over 8 years ago
- File 0001-manager-add-menu.json-entry-point-7366.patch 0001-manager-add-menu.json-entry-point-7366.patch added
- Status changed from Nouveau to En cours
- Patch proposed changed from No to Yes
Updated by Benjamin Dauvergne over 8 years ago
Il faut utiliser request.user.has_perm_any
au lieu de request.user.has_perm
. has_perm
ne gère que les permissions sur tous les objets ou aucun.
Updated by Benjamin Dauvergne over 8 years ago
Ok. Il faudrait tester si l'utilisateur est anonyme aussi mais je vais plutôt monkey-patcher AnonymousUser pour y ajouter la méthode has_perm_any()
. Donc ack.
Updated by Frédéric Péters over 8 years ago
As we're behind login_required() we're sure the user does exist.
Updated by Frédéric Péters over 8 years ago
- Status changed from En cours to Résolu (à déployer)
I added the part about /manage/services/ as I noticed it got pushed.
commit 998ece18a25e6706f22af32d2f08211a6c6ca0c4 Author: Frédéric Péters <fpeters@entrouvert.com> Date: Wed May 27 18:16:07 2015 +0200 manager: add menu.json entry point (#7366)
manager: add menu.json entry point (#7366)