Starting a New Project somewhat like multitenant saas appication.

42 views
Skip to first unread message

Devender Kumar

unread,
Sep 25, 2018, 7:16:32 AM9/25/18
to Django users
Hello,
I am Dev just two step ahead of a beginner(recently started to code in Django). I want to develop an application seeking for some thoughts(help/ favors/ etc) from you guys.
The application fundamental is like Hierarchy is like At top soft engg. team (me) > partners> client> location> device> end-user. All are using the same application with some changes.
Database: wanna have a common database for all. all the tables are shared among hierarchy and records are filter according to the roles.

Now the few questions the role-based authentication I can do but is there any other better option or thing available?
The second question is I want some database distribution at partner level there is the concept of schemas (can you put some light on this also). I want this to make queries little fast, independent and secure.

Any type of solution. suggestion, reference you have happy to see 
Regards 
Dev

Thank you so much.

Scot Hacker

unread,
Sep 26, 2018, 2:04:14 AM9/26/18
to Django users
It's a little tough to understand what your actual questions are, but:

> the role-based authentication I can do but is there any other better option or thing available?

The native Django permissions system is limited to specifying who can see or edit particular models (and even then, is limited to ALL model instances of a given class, rather than specific ones like "just MY posts").  In my experience, there is more to granting permissions for users in different roles than what Django provides. For more complex requirements, I've had great success with django-rules:


which you can use in conjunction with Django Groups to make your permissions logic as fine-grained as you need, using arbitrary logic nicely organized into "predicates" that you can combine in and/or statements. And you can use it to keep all of your rules in one central place. 

Keeps permissions logic consistent throughout the project, and nicely testable.

./s
Reply all
Reply to author
Forward
0 new messages