Project

General

Profile

Bug #7366

expose /manage/ backoffice menu entries in jsonp

Added by Frédéric Péters about 4 years ago. Updated almost 4 years ago.

Status:
Fermé
Priority:
Normal
Category:
-
Target version:
Start date:
26 May 2015
Due date:
% Done:

0%

Patch proposed:
Yes
Planning:
No

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).

0001-manager-add-menu.json-entry-point-7366.patch View (2.78 KB) Frédéric Péters, 27 May 2015 06:24 PM

0001-manager-add-menu.json-entry-point-7366.patch View (2.79 KB) Frédéric Péters, 27 May 2015 07:00 PM


Related issues

Related to Publik - Development #7163: Rendre le menu déroulant Publik contextuel + Wording Fermé 07 May 2015

Associated revisions

Revision 998ece18 (diff)
Added by Frédéric Péters about 4 years ago

manager: add menu.json entry point (#7366)

History

#1 Updated by Frédéric Péters about 4 years ago

  • Related to Development #7163: Rendre le menu déroulant Publik contextuel + Wording added

#2 Updated by Frédéric Péters about 4 years ago

  • Subject changed from expose /manager backoffice menu entries in jsonp to expose /manage/ backoffice menu entries in jsonp
  • Description updated (diff)

#3 Updated by Frédéric Péters about 4 years ago

  • Assignee changed from Benjamin Dauvergne to Frédéric Péters

I'll get to it.

#4 Updated by Frédéric Péters about 4 years ago

#5 Updated by Benjamin Dauvergne about 4 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.

#7 Updated by Benjamin Dauvergne about 4 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.

#8 Updated by Frédéric Péters about 4 years ago

As we're behind login_required() we're sure the user does exist.

#9 Updated by Benjamin Dauvergne about 4 years ago

  • Target version set to 2.2.0

#10 Updated by Benjamin Dauvergne about 4 years ago

Ack.

#11 Updated by Frédéric Péters about 4 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)

#12 Updated by Frédéric Péters almost 4 years ago

  • Status changed from Résolu (à déployer) to Fermé

Also available in: Atom PDF