Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty menu items #20

Open
fopina opened this issue Feb 5, 2023 · 0 comments · May be fixed by #23
Open

Empty menu items #20

fopina opened this issue Feb 5, 2023 · 0 comments · May be fixed by #23

Comments

@fopina
Copy link
Contributor

fopina commented Feb 5, 2023

item['has_perms'] = item.get('has_perms', True) and context['user'].has_perms(data['permissions'])

Custom permissions (for menu item) are checked here but not really used anywhere.

If the user does not have the minimum permission for the menu, the app_list entry should be removed entirely (probably here to keep template logic simpler).

As an extra, it could be interesting to have the menu item removed if there is no minimum permission for the sub-entries either. But it needs to be verified whether or not top items can be links directly (so that would be another check).
This could actually be the only check (and removing permissions from top key)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant