How to write and set a custom dashboard perm

47 views
Skip to first unread message

Pablo Camino Bueno

unread,
Jul 31, 2017, 6:39:30 AM7/31/17
to django-oscar
Hello, 

I'm using a mixin in my dashboard views to handle a concrete user access permission, customizing dispatch(). I'd like to remove the mixin, and add this user-access-requirement to the permissions_map in the parent dashboard view to affect all of them.

So it'd be something like: 

class DashboardApplication(BaseDashboardApplication):
permissions_map
= {
   
'index': (['is_staff', 'my_custom_requirement'], ['partner.dashboard_access', 'my_custom_requirement']),
}


My questions are, is this the correct approach? Where should I write this function?

Thanks


Jaime Lynn

unread,
Oct 16, 2017, 2:49:22 PM10/16/17
to django-oscar
I want to know too!
Reply all
Reply to author
Forward
0 new messages