Hi,
Say I have a function as follows:
def is_supervisor(user):
return user.groups.filter(name='supervisor').exists()
...and a CBV for deleting records:
class DeleteFlow(DeleteView):
# etc...
How can I restrict access to this view using the function?
I understand that this may be possible with a mixin, but how?
Or is there a better way?
Thanks