Skip to content

[admin-theme] menu doesn't respect assigned permissions #103

@okraits

Description

@okraits

The links "Templates" and "VPN Servers" are available in the menu although the user doesn't have the rights for these objects:

grafik

grafik

I had a look into this a bit:

https://github.com/openwisp/openwisp-utils/blob/master/openwisp_utils/admin_theme/context_processor.py#L32

  • ModelAdmin.has_module_permission evaluates permissions only on the module level, not on the model level (Device, Template, Vpn).
  • openwisp-utils is decoupled from the other OpenWISP modules so we don't have access to models etc

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions