Tuesday, November 22, 2016

Django authorisation within PostgreSQL

Hey guys,

I'm working on a Django project which has a native PostgreSQL database, filled with schemes that contain both read-only and normal tables and with it's own user- and group roles.

After manually changing the search_path variable, I have managed to import my current models by running the migrate.inspectdb command and improved the generated models by sorting, changing primary keys etc.
Django's automatic admin interface added new tables which can contain users, but ideally that's not what I want for my project. I'd rather have my current login- and group roles defined in PostgreSQL implemented in Django, because there are some already defined restrictions and triggers implemented in my PostgreSQL database that use these user- and group roles. 


Is there any convenient way to import the already defined user- and group roles in PostgreSQL so they work with Django? 
As a start I'd like a login page that based on supplied credentials grants access to my database with defined users that are part of the group "analyse" (I.E cevoo).
I've included an image that shows my database schemes and user/groups. Hopefully you guys can help me out!

With kind regards,

Danny

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ddbd5a11-91fa-4411-b084-306b59b39e95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment