dynamic sitetree - access_by_perms
waszi opened this issue · 3 comments
waszi commented
I have tried to add access_by_perms to my dynamic sitetree but it is ignored. Test user wihout
'service.is_hosting_user' is still able to see menu item.
my app sitetrees.py:
from sitetree.utils import tree, item
from django.utils.translation import ugettext_lazy as _
sitetrees = (
tree('dynamic', items=[
item(
_('FTP Accounts'),
'ftp:index',
access_loggedin=True,
access_by_perms=['service.is_hosting_user'],
alias='ftp_index',
children=[
item(_('Add'), 'ftp:add'),
item(_('List'), 'ftp:index'),
item(_('{{ obj }}'), 'ftp:edit obj.pk', in_menu=False, children=[
item('Access logs', 'ftp:logs obj.pk'),
]),
]
),
]),
)
idlesign commented
Thank you for the report.
I'll try to reproduce it and see what could be done in a couple of days.