prixite / saas-erp

0 stars 0 forks source link

Show only those links in top menu which are accessible #73

Open umairwaheed opened 2 years ago

umairwaheed commented 2 years ago

Background

The application access is determined by OrganizationModule and UserModuleRole. OrganizationModule determines which modules are accessible to the organization and UserModuleRole determines which modules of the organization are accessible to the user. Take a look at PrivateViewMixin to see how we are restricting access.

Implementation Sketch

Add a new context processor which adds information of the accessible modules. Use this information in https://github.com/prixite/saas-erp/blob/master/app/templates/app/html/base.html#L22 to show/hide menu items.

umairwaheed commented 1 year ago

Doesn't work:

image
umairwaheed commented 1 year ago

Overall looks better. There is a small bug. In the screenshot below I am logged in as super admin (super@erp.com). I try to delete the owner and when I get to the delete confirmation page, the top bar changes.

image

How it should be:

image