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

Defining menu items can break for users without permissions #130

Open
nielsvanoch opened this issue Oct 15, 2024 · 0 comments
Open

Defining menu items can break for users without permissions #130

nielsvanoch opened this issue Oct 15, 2024 · 0 comments

Comments

@nielsvanoch
Copy link

If you define the JET_SIDE_MENU_ITEMS setting with a list of models, for instance like this:

JET_SIDE_MENU_ITEMS = [
    {
        'label': 'foo',
        'items': [
            {
                	'label': 'bar',
                	'url': {'type': 'model', 'app_label': 'foo', 'model': 'bar'},
             },
        ],
    },
]

When a user that does not have any permissions to the foo.bar model tries to load the admin, they will trigger a KeyError here: https://github.com/assem-ch/django-jet-reboot/blob/master/jet/utils.py#L310, since the model won't be present in models.

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

No branches or pull requests

1 participant