Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
1128 Представления

Default odoo project user have only read permission given. But i want to give project edit permission if any user from project user group have project manager of that project.

Currenly:

access_project_project,project.project,project.model_project_project,project.group_project_user,1,0,0,0

my attempt in project_security.xml :


    
        Project Manager Edit Own Project
        
        
        [('user_id', '=', user.id)]
        
        
        
        
    

But my above attempt not working as expectation. Thanks in advance



Аватар
Отменить
Лучший ответ

To give users in the project.group_project_user group edit permissions on a project if they are the project manager (i.e., if they are listed as the user_id of the project), you will need to adjust your security rules carefully.


Step 1: Create a Record Rule for the Project User Group

You need to define a record rule that grants write access to users only on projects where they are the manager (user_id).


Step 2: Modify the Access Control List (ACL) if Necessary

The existing ACL for project.group_project_user grants only read access. Since you want to allow write access based on a condition, ensure that the ACL for the project.group_project_user group


The ir.rule you added applies a filter to the project.project model, only granting write permissions (perm_write) where the user_id matches the current user's ID - user.id

This rule only applies to users in the project.group_project_user group, allowing them to edit their own projects while keeping the default read-only permissions for other projects.

Аватар
Отменить
Автор

problem solved. thanks

Related Posts Ответы Просмотры Активность
0
июл. 23
4
3
мар. 25
3107
0
мар. 25
1512
4
янв. 25
2504
1
нояб. 24
2588