Files
odoo_source/addons/hr/security/ir.model.access.csv
T
RomainLibert c9ca376146 [IMP] hr: Introduce the public employee profile
Purpose
=======

1/ Robustness & security: right now it is not easy to understand and do something
   clean in term of security (hr people vs employees, private info vs public). A
   HR officer doesn't know if he can write something on the chatter. Currently, a
   note will be visible for all the employees who have access to the employee form
   view for example.
2/ In term of business, it makes sense to let a hr manages payroll stuff (contract,
   employees private information, ... and other employee see public information
   (résumé and work information)

Specification
=============

Introduce 2 new models:

- hr.employee.base (AbstractModel): This represents the basic skeleton
  model on which the shared fields and methods between the public and
  the private employees models.
- hr.employee.public (_auto=False): This is a sql view based on the
  employee values, readable for an internal user (i.e. an employee).

The model hr.employee is not readable anymore for an employee.

There are now 3 ways to access the employee data:
1/ From the hr.employee views. HR officer access rights are required
2/ From the public profile. The public data for an employee are accessible
   but can't be modified.
3/ From the 'My Profile' menu. A classic employee can access its own
   data from there, and can modify them.
2019-05-31 10:21:20 +02:00

1.4 KiB

1idnamemodel_id:idgroup_id:idperm_readperm_writeperm_createperm_unlink
2access_hr_employee_category_userhr.employee.category.usermodel_hr_employee_categorygroup_hr_user1111
3access_hr_employee_category_emphr.employee.category.empmodel_hr_employee_categorybase.group_user1000
4access_hr_employee_userhr.employee usermodel_hr_employeegroup_hr_user1111
5access_hr_employee_system_userhr.employee system usermodel_hr_employeebase.group_user0000
6access_hr_employee_public_userhr.employee_publicmodel_hr_employee_publicbase.group_user1000
7access_hr_employee_resource_userresource.resource.userresource.model_resource_resourcegroup_hr_user1111
8access_hr_department_userhr.department.usermodel_hr_departmentgroup_hr_user1111
9access_hr_department_employeehr.department.employeemodel_hr_departmentbase.group_user1000
10access_hr_job_userhr.job usermodel_hr_jobgroup_hr_user1111
11access_ir_property_hr_userir_property hr_userbase.model_ir_propertygroup_hr_user1110
12access_hr_plan_activity_type_employeeaccess_hr_plan_activity_typemodel_hr_plan_activity_typebase.group_user1000
13access_hr_plan_employeeaccess_hr_plan_employeemodel_hr_planbase.group_user1000
14access_hr_plan_activity_type_hr_useraccess_hr_plan_activity_typemodel_hr_plan_activity_typegroup_hr_user1111
15access_hr_plan_hr_useraccess_hr_plan_hr_usermodel_hr_plangroup_hr_user1111