Project

General

Profile

Bug #7366

expose /manage/ backoffice menu entries in jsonp

Added by Frédéric Péters almost 6 years ago. Updated over 5 years ago.

Status:
Fermé
Priority:
Normal
Category:
-
Target version:
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

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

Actions

Associated revisions

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

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

History

#1

Updated by Frédéric Péters almost 6 years ago

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

Updated by Frédéric Péters almost 6 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 almost 6 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 almost 6 years ago

#5

Updated by Benjamin Dauvergne almost 6 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 almost 6 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 almost 6 years ago

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

#9

Updated by Benjamin Dauvergne almost 6 years ago

  • Target version set to 2.2.0
#10

Updated by Benjamin Dauvergne almost 6 years ago

Ack.

#11

Updated by Frédéric Péters almost 6 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 over 5 years ago

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

Also available in: Atom PDF