Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
8920 Ansichten

Hello

By default, a user having the access rights from the group 'Project/User' is allowed to read/write on any project or task.

I would like that a project user can only read and write the projects and tasks assigned to him.

I googled a bit and also have a look at the 'Setting>Users>Groups' and  'Setting>Security>Record Rules' sections but did not get a clear understanding of the direction into which I should move

Any help would be appreciated

 

Many thanks

Franck

Avatar
Verwerfen
Beste Antwort

You are on the right track.

Add a record rule for object Project with 'apply for read' and 'apply for write'.

Use the following domain: [('members', '=', user.id)]

And select the Project / User group.

 

This way, users of group.project_users will only have read and write access if they are member in the project.

 

Regards.

 

Avatar
Verwerfen
Autor Beste Antwort

Nice & swift answer !!

Is there a list of ojects properties (such as 'members') available somewhere ?

I browsed the developpers doc but did not find any list

Many thanks

franck

Avatar
Verwerfen

You can check the columns of any table in the database. (Using pgAdmin i.e.). Or you can check the python code for the _columns attribute. Or you can see all fields of any database object in the webclient under Settings -> Technical -> Databse Structure -> Models. Select the object you want and see the fields-tab. (Technical Features must be activated in the users Access Rights)

Autor

I went through the database stucture and wanted to define a rule allowing only tasks assigned to project users to be displayed in list of tasks (project>project> tasks). I thus created a record rule for Project.task with 'apply for read' and 'apply for write'. and the following domain: [('user_id', '=', user.id)] for Project / User group.. It doesn't do what I was expecting... There is something I did not understood

Autor

I finally managed to make it by making the rule above as global.

Verknüpfte Beiträge Antworten Ansichten Aktivität
3
Okt. 25
3165
2
Sept. 25
805
2
Sept. 25
1632
1
Juli 25
1245
2
Juni 25
3657