Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0038659Openbravo ERPC. Securitypublic2018-05-30 15:542018-06-04 09:57
alostale 
alostale 
normalminorhave not tried
closedfixed 
5
 
3.0PR18Q3 
caristu
Core
No
0038659: new roles should be manual by default
When creating new Roles, it is possible to define whether access for all objects will be granted automatically or not (through the Manual flag) also in case of automatic access if access to advanced features will be granted, see doc [1].

Currently new roles are defaulted to automatically be granted to all possible objects by being not manual and advanced features.

It is more common to have restricted roles with access to only some specific objects than roles with access to all of them.

Current defaults are error prone: if the user creating a new role forgets to flag default "Manual" field and saves the new role, all objects will be automatically granted. Setting it correctly afterwards, forces to remove access to all those objects.

---
[1] http://wiki.openbravo.com/wiki/Role [^]
1. Create a new role keeping all default values
  -> check there is access to all windows, reports, etc

-Change defaults to
  Manual: Yes
  Advanced: No
- If a role is updated afterwards from manual to automatic, grant access to all objects automatically
No tags attached.
related to feature request 0038689 closed caristu It should not be possible to set as Automatic those Manual roles inheriting permissions 
Issue History
2018-05-30 15:54alostaleNew Issue
2018-05-30 15:54alostaleAssigned To => alostale
2018-05-30 15:54alostaleModules => Core
2018-05-30 15:54alostaleTriggers an Emergency Pack => No
2018-05-31 14:25hgbotCheckin
2018-05-31 14:25hgbotNote Added: 0104842
2018-05-31 14:25hgbotStatusnew => resolved
2018-05-31 14:25hgbotResolutionopen => fixed
2018-05-31 14:25hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/5ae34663c0339d067e787c2e4f9784df253bbbfe [^]
2018-05-31 14:28alostaleReview Assigned To => caristu
2018-06-04 09:54caristuIssue cloned0038689
2018-06-04 09:54caristuRelationship addedrelated to 0038689
2018-06-04 09:57caristuNote Added: 0104904
2018-06-04 09:57caristuStatusresolved => closed
2018-06-04 09:57caristuFixed in Version => 3.0PR18Q3

Notes
(0104842)
hgbot   
2018-05-31 14:25   
Repository: erp/devel/pi
Changeset: 5ae34663c0339d067e787c2e4f9784df253bbbfe
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Wed May 30 13:03:45 2018 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/5ae34663c0339d067e787c2e4f9784df253bbbfe [^]

fixes 38659: new roles should be manual by default

  * By default, new roles are now maked as manual and not advanced
  * When a role is moved from manual to automatic, permissions are now recalculated
  * Roles created in Initial Client and Org setup are kept as privileged

---
M src-db/database/model/tables/AD_ROLE.xml
M src-db/database/model/triggers/AD_ROLE_TRG.xml
M src-db/database/sourcedata/AD_COLUMN.xml
M src/org/openbravo/erpCommon/businessUtility/InitialSetupUtility.java
---
(0104904)
caristu   
2018-06-04 09:57   
Code reviewed + tested OK.