Search code examples
django-viewflow

List all viewflow processes the user is allowed to


I'm trying to implement django-viewflow in my project, using django-admin as a GUI.

I'm currently trying to create a custom view and relative template to show a user a list of all the processes that he can start, so not the process instances but a list of process models he's allowed to see.

Is it possible? I tried using the ProcessListView but it requires a flow_class, while I'd like to see all flows the user is allowed to.


Solution

  • You can get available process instances with Process.objects.filter_available([flow_class1, flow_class2, ...], user)