Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028999Openbravo ERPA. Platformpublic2015-02-19 17:212015-03-13 18:40
jonalegriaesarte 
inigosanchez 
urgentmajorhave not tried
closedfixed 
5
 
3.0PR15Q33.0PR15Q3 
alostale
Core
No
0028999: Grant access to buttons is not working fine depending on the process you want to configure
Grant access to buttons is not working fine depending on the process you want to configure. Working in good receipt window, we can see that depending on the process, the permission is granted correctly. Apart from that there are two parallel topics related to this one. If you need me to create different issues for them, please let me know.
Issue 1:
- Set prefrence "Secured_process": http://wiki.openbravo.com/wiki/Role#Process_Definition [^]
- Create a new role set as manual. Example: accountant
- Grant access to several orgs
- Grant access to user Openbravo
- Grant edit access to goods receipt window.
Logout and login with the new role, and access to good receipt window, creating a new header. See that the user can perform Create Lines From process but not Complete process. This is wrong, none of them should be available.

Issue 2: (continue with the example above)
- Goods receipt window press accounting tab
- Press header
- Complete button is available, which is wrong.

Issue 3:
In role window, the user can not gran permission for create lines from, post process....
No tags attached.
related to defect 0029035 closed inigosanchez Process definition containing parameters defined as "window", should automatically inherit permissions 
related to design defect 0029231 new Triage Platform Base Define createLinesFrom process and posted process as an OB standard process. 
Issue History
2015-02-19 17:21jonalegriaesarteNew Issue
2015-02-19 17:21jonalegriaesarteAssigned To => AugustoMauch
2015-02-19 17:21jonalegriaesarteModules => Core
2015-02-19 17:21jonalegriaesarteResolution time => 1426028400
2015-02-19 17:21jonalegriaesarteTriggers an Emergency Pack => No
2015-02-23 08:48alostaleStatusnew => acknowledged
2015-02-23 13:30jonalegriaesarteTarget Version3.0PR15Q2 => 3.0PR15Q3
2015-02-23 18:32alostaleRelationship addedrelated to 0029035
2015-02-26 11:43alostaleStatusacknowledged => scheduled
2015-02-26 11:43alostaleAssigned ToAugustoMauch => inigosanchez
2015-02-26 11:43alostalefix_in_branch => pi
2015-03-11 01:03hgbotCheckin
2015-03-11 01:03hgbotNote Added: 0075427
2015-03-11 01:14inigosanchezNote Added: 0075428
2015-03-11 01:15inigosanchezRelationship addedrelated to 0029231
2015-03-11 01:15inigosanchezAssigned Toinigosanchez => alostale
2015-03-11 01:16inigosanchezIssue Monitored: inigosanchez
2015-03-11 08:14hudsonbotCheckin
2015-03-11 08:14hudsonbotNote Added: 0075436
2015-03-11 09:18hgbotCheckin
2015-03-11 09:18hgbotNote Added: 0075438
2015-03-11 15:44alostaleStatusscheduled => resolved
2015-03-11 15:44alostaleFixed in Version => 3.0PR15Q2
2015-03-11 15:44alostaleFixed in SCM revision => https://code.openbravo.com/erp/devel/pi/rev/e3be6765552d7089ad087c9db33c74cb76e6a027 [^]
2015-03-11 15:44alostaleResolutionopen => fixed
2015-03-11 16:20hudsonbotCheckin
2015-03-11 16:20hudsonbotNote Added: 0075451
2015-03-13 10:45alostaleNote Added: 0075526
2015-03-13 10:45alostaleStatusresolved => new
2015-03-13 10:45alostaleResolutionfixed => open
2015-03-13 10:45alostaleFixed in Version3.0PR15Q2 =>
2015-03-13 10:45alostaleStatusnew => scheduled
2015-03-13 10:45alostaleAssigned Toalostale => inigosanchez
2015-03-13 10:55alostaleNote Edited: 0075526bug_revision_view_page.php?bugnote_id=0075526#r7950
2015-03-13 10:56alostaleNote Edited: 0075526bug_revision_view_page.php?bugnote_id=0075526#r7951
2015-03-13 11:58hgbotCheckin
2015-03-13 11:58hgbotNote Added: 0075540
2015-03-13 11:58hgbotStatusscheduled => resolved
2015-03-13 11:58hgbotResolutionopen => fixed
2015-03-13 11:58hgbotFixed in SCM revisionhttps://code.openbravo.com/erp/devel/pi/rev/e3be6765552d7089ad087c9db33c74cb76e6a027 [^] => http://code.openbravo.com/erp/devel/pi/rev/a102d4101225d42448cde7ebc0eb010958c487c2 [^]
2015-03-13 12:32alostaleReview Assigned To => alostale
2015-03-13 12:32alostaleNote Added: 0075545
2015-03-13 12:32alostaleStatusresolved => closed
2015-03-13 12:32alostaleFixed in Version => 3.0PR15Q3
2015-03-13 18:40hudsonbotCheckin
2015-03-13 18:40hudsonbotNote Added: 0075580

Notes
(0075427)
hgbot   
2015-03-11 01:03   
Repository: erp/devel/pi
Changeset: e3be6765552d7089ad087c9db33c74cb76e6a027
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Wed Mar 11 01:02:42 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/e3be6765552d7089ad087c9db33c74cb76e6a027 [^]

Related bug 28999: Grant access to buttons is not working fine in some cases.

The issue had three parts to fix. The part that has been fixed is number two:
The problem was to grant access to buttons when "Secured_process" preference
was "Yes". This problem caused a bad behavior in access to buttons in child tabs.

This bad behavior is reproduced when inherit buttons are created in a non-active
child tab.The buttons are created from "actionToolbarButtons" not in
"toolBar.rightMembers". This was a problem because actionToolbarButtons did not
have "readOnlyIf" property. This property makes accessibility to a process work
correctly.

To solve this problem it has been set the property "readOnlyIf" in
"actionToolbarButtons" at the same time that in "toolBar.rightMembers".Thus when
inherit buttons are created in a child tab, the property "readOnlyIf" exists.
This will keep the same behavior on the inherited buttons in the child tabs.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
---
(0075428)
inigosanchez   
2015-03-11 01:14   
The first and Third part is move to another issue as a design defect: https://issues.openbravo.com/view.php?id=29231 [^]

The second part of this issue it has been fixed in previous changeset https://code.openbravo.com/erp/devel/pi/rev/e3be6765552d7089ad087c9db33c74cb76e6a027 [^] .
(0075436)
hudsonbot   
2015-03-11 08:14   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5721e314077a [^]
Maturity status: Test
(0075438)
hgbot   
2015-03-11 09:18   
Repository: erp/devel/pi
Changeset: 7fdaf092666314e2940a0ef051890f2659536808
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Wed Mar 11 09:17:00 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/7fdaf092666314e2940a0ef051890f2659536808 [^]

Related bug 28999: The i index is wrong.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
---
(0075451)
hudsonbot   
2015-03-11 16:20   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/5f447e753563 [^]
Maturity status: Test
(0075526)
alostale   
2015-03-13 10:45   
(edited on: 2015-03-13 10:56)
Reopening it, failing at least in cases 2.3 and 3.4

Test cases:

1. Button defined in header: Goods Receipt > Header, Complete button
1.1 Goods Receipt > Header tab -> OK
1.2 Goods Receipt > Header > Lines tab (button defined in parent, 1st tab) -> OK
1.3 Goods Receipt > Header > Accounting (button defined in parent, 2nd tab) -> OK
2. Button defined in 1st subtab: G/L Journal> Journal > Header, button Process
2.1 G/L Journal> Journal > Header -> OK
2.2 G/L Journal> Journal > Header > Lines (1st tab at that level) -> OK
2.3 G/L Journal> Journal > Header > Accounting (2nd tab at that level) -> FAIL
3. Button defined in nth subtab: Financial Account > Account > Imported Bank Statement, Process button
3.3 Financial Account > Account > Imported Bank Statement -> OK
3.4 Financial Account > Account > Imported Bank Statement > Bank Statement Lines (1st tab at 3rd level)-> FAIL

(0075540)
hgbot   
2015-03-13 11:58   
Repository: erp/devel/pi
Changeset: a102d4101225d42448cde7ebc0eb010958c487c2
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Mar 13 11:57:34 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/a102d4101225d42448cde7ebc0eb010958c487c2 [^]

Fixed bug 28999:It's failing access to defined parent buttons in 2th-3th level

The problem was related to the previous changes. It had added a wrong condition
that prevented a good behaviour in all cases. The wrong condition is:
"if (!view.parentView && button.view.actionToolbarButtons.containsProperty('property', button.property)) {"

Now, it have been resolved all problems by removing the part of the condition
that checks if a view is parent or not. There was no sense.

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/main/ob-standard-window.js
---
(0075545)
alostale   
2015-03-13 12:32   
Code reviewed

Test case executed (pending to add them to test link):

1. Button defined in header: Goods Receipt > Header, Complete button
1.1 Goods Receipt > Header tab -> OK
1.2 Goods Receipt > Header > Lines tab (button defined in parent, 1st tab) -> OK
1.3 Goods Receipt > Header > Accounting (button defined in parent, 2nd tab) -> OK
2. Button defined in 1st subtab: G/L Journal> Journal > Header, button Process
2.1 G/L Journal> Journal > Header -> OK
2.2 G/L Journal> Journal > Header > Lines (1st tab at that level) -> OK
2.3 G/L Journal> Journal > Header > Accounting (2nd tab at that level) -> OK
3. Button defined in nth subtab: Financial Account > Account > Imported Bank Statement, Process button
3.3 Financial Account > Account > Imported Bank Statement -> OK
3.4 Financial Account > Account > Imported Bank Statement > Bank Statement Lines (1st tab at 3rd level)-> OK
(0075580)
hudsonbot   
2015-03-13 18:40   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/3019166d6076 [^]
Maturity status: Test