İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
8945 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
Üretici En İyi Yanıt

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
Vazgeç

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)

Üretici

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

Üretici

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
3
Eki 25
3208
2
Eyl 25
818
2
Eyl 25
1647
1
Tem 25
1256
2
Haz 25
3674