V
V
Vladimir2022-03-10 03:42:40
Django
Vladimir, 2022-03-10 03:42:40

In Django, how do you make a project owner able to share a project with other users?

Hello! Please share your experience, who did in Django the access rights of several users to one model object. I read various articles, but I still didn’t understand how to do it correctly.

There is a Projects model, there are projects in it. You need to make sure that the owner of the project can give access to the project to other users. Access to view or edit.

It is possible to make a separate ProjectRights model, where to link the Project, the User and the user's options for the right to the project. Then, using this model, check which projects, what rights the user has. But perhaps this is not the best / safest / best practice and so on implementation option. There must be something beautiful, Dzhang and more correct?

Who knows, tell me please! Just in case, I’ll say that I don’t know Django very well yet, maybe I don’t see something obvious and Django is used as a backend, on the Vue front.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dr. Bacon, 2022-03-10
@bacon

1. google "django permissions per object" or go here https://djangopackages.org/grids/g/perms/ choose ready-
made

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question