Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Users rights management: limiting access to task

By
flg
on 7/23/14, 4:02 AM 1,592 views

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

1

René Schuster

--René Schuster--
1560
| 5 5 8
Weinheim, Germany
--René Schuster--

Challenge Everything!

René Schuster
On 7/23/14, 4:13 AM

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.

 

0
flg
On 7/23/14, 5:59 AM

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

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)

René Schuster
on 7/23/14, 6:12 AM

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

flg
on 7/29/14, 6:14 AM

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

flg
on 7/29/14, 6:15 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 7/23/14, 4:02 AM
Seen: 1592 times
Last updated: 3/16/15, 8:10 AM