[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu



Hi Brian;

I have filed bug 820 on this issue.  You can see it at https://sourceforge.net/p/ledger-smb/bugs/820/

The one that I need to look at more closely is this entry in menu_acl (the rest should be fully safe):

  id  |                  role_name                   | acl_type | node_id 
------+----------------------------------------------+----------+---------
 8354 | public                                       | allow    |     192

That node is for New Window.  I don't know why it is showing as a menu item but I will need to look into that more clearly.  You may want to add that entry back (don't worry about the id field, that's a sequence, but role_name, acl_type, and node_id should be added).  Something is fishy there and we will get to it as we work on the bug report but for now that entry should probably be added back.

Best Wishes,
Chris Travers



On Sun, May 12, 2013 at 12:40 PM, Brian Wolf <..hidden..> wrote:
Thanks, Chris.

Turns out that four additional, out-of-the-box entries were also deleted when running this SQL:

delete from menu_acl where node_id in (select node_id from menu_attribute where attribute = 'menu');

Brian

Brian Wolf
Email: ..hidden..
Try out Activus Secure Payments™, our recurring payments application.
On 05/10/2013 01:39 AM, Chris Travers wrote:



On Thu, May 9, 2013 at 5:52 PM, Brian Wolf <..hidden..> wrote:
I'm just starting on the LedgerSMB development list. Our clients have asked us to write enhancements to LedgerSMB.

We'd like to add a first-level menu item called Favorites.  Not hard to create a menu node using function select_menu(), and then adding a row in menu_attribute and menu_acl.  But, it doesn't operate as I would have expected.  The entire menu is now displayed as a child of the new Favorites menu option, even though the parent ID of Favorites is also zero.

This happens when generate_menu() pulls an empty menu for which you have permission.

To avoid this do not grant permission to menu_node entries which are menus.  Set only to the actual entries one needs to get work done (parent menus will be automatically included). 

To fix:  

delete from menu_acl where node_id in (select node_id from menu_attribute where attribute = 'menu');

Best Wishes,
Chris Travers

Can someone who has had some experience with menus point me in the right direction?

Thanks.
Brian

Brian Wolf
Email: ..hidden..
Try out Activus Secure Payments™, our recurring payments application.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel




------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may


_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel


------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and
their applications. This 200-page book is written by three acclaimed
leaders in the field. The early access version is available now.
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel