Great, thanks man! I will try that. Using local auth and PostgreSQL - no cloud services.
Regards! Wim On Mon, 11 Nov 2019 at 08:39, Motaz Hejaze <[email protected]> wrote: > I dont know what is your authentication based on , but i faced such a > scenario .. > > One of the solutions is to make a middleware that checks the user type > with the url prefix > > So usertype1 all related routes will be under /usertype1/ > > usertype2 all related routes will be under /usertype2/ > > Middleware will check user_type fron sessions or jwt ( depends on your > auth system ) and compare it with the requested url , if they are identical > then permission guaranteed , else redirect somewhere > On Mon, 11 Nov 2019, 8:14 am Wim Olivier, <[email protected]> wrote: > >> Thanks Motaz, >> >> That gives me a little bit of direction. >> I'm thinking now of controlling access to each app's URL's via a single >> piece of middleware (instead of at each View - just have to figure out how >> to do that. >> >> Regards, >> Wim >> >> On Saturday, 9 November 2019 10:44:58 UTC+2, Motaz Hejaze wrote: >>> >>> If you dont want django admin just remove it from installed apps , >>> middleware and urls.. >>> >>> But i dont advice you to do this , you can make you own dashboards and >>> keep django default admin panel .. >>> >>> You need a 3 signup pages and 3 login pages , each signup page will >>> create a different user and each login page will login each user type to >>> his dashboard type .. >>> I advice you to make a 3 seperate apps to organize the code .. >>> >>> On Sat, 9 Nov 2019, 5:34 am Wim Olivier, <[email protected]> wrote: >>> >>>> Hi everyone, >>>> >>>> I would like to disable the Django Admin, and create my own custom >>>> admin dashboards. >>>> There must be three different types of admin dashboards: >>>> - one for Customers (normal users) where they can do CRUD on their >>>> profile and services (URI: /customer/dashboard) >>>> - one for Partners where they can do CRUD on their users/customers, and >>>> their Customers' profile and services (URI: /partner/dashboard) >>>> - one for Super Users where they can do CRUD on Customers, Partners, >>>> and everything else (URI: /administration) >>>> >>>> I understand very well the ways to extend the User model - that part >>>> I'm OK with. >>>> >>>> Just some practical pointers with a small example, or links to >>>> Django-based repos that implement something like this, please. >>>> I just need some guidance. >>>> >>>> Many thanks! >>>> Wim Olivier >>>> South Africa >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Django users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to [email protected]. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/django-users/66befa62-2c5b-4d3d-9653-1c8169ccdcc2%40googlegroups.com >>>> <https://groups.google.com/d/msgid/django-users/66befa62-2c5b-4d3d-9653-1c8169ccdcc2%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/8b2bcb0b-803c-4da2-9d33-225bd6fcb9b7%40googlegroups.com >> <https://groups.google.com/d/msgid/django-users/8b2bcb0b-803c-4da2-9d33-225bd6fcb9b7%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Django users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/django-users/1vviNQbdp2U/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CAHV4E-c1EcLfpdDRdVnaT0Cyd9_6kF%2BioDr%3Dy_4hKP6HovChBw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CAHV4E-c1EcLfpdDRdVnaT0Cyd9_6kF%2BioDr%3Dy_4hKP6HovChBw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPVExF%2B%2BRnZhe_MyYRUXCKw2Wh_97kwFREVKYN7_sRXNSXDoog%40mail.gmail.com.

