Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0041684Openbravo ERPA. Platformpublic2019-08-23 13:162019-11-12 16:13
AugustoMauch 
AugustoMauch 
normalcriticalhave not tried
closedfixed 
5
 
3.0PR19Q4 
caristu
Core
No
0041684: Extra widget instances are created if permission to widget class is removed
If access is removed from a widget, when there are already existing widget instances for that widget, each time widgets are refreshed new widget instances will be created
Count the number of widget instances in you development environment:
  select count(*) from obkmo_widget_instance

As System Admin:
- Open the Widget window, select the Welcome to Openbravo 3 widget
- Uncheck its Enable for All Users flag, set its module in development if needed

As F&B Admin:
- Open the Role window, select the F&B International Group Admin
- In the Widget Class Access subtab, remove the entry for the Welcome to Openbravo 3 widget

Restart the server (list of available widget classes is cached)

Log in with the F&B Admin role

Check that each time the Refresh button in the Manage Workspace is clicked, the number of widget instances increases.
No tags attached.
depends on backport 00422603.0PR19Q3.3 closed AugustoMauch Extra widget instances are created if permission to widget class is removed 
Issue History
2019-08-23 13:16AugustoMauchNew Issue
2019-08-23 13:16AugustoMauchAssigned To => AugustoMauch
2019-08-23 13:16AugustoMauchModules => Core
2019-08-23 13:16AugustoMauchTriggers an Emergency Pack => No
2019-08-23 13:40AugustoMauchSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19324#r19324
2019-08-23 13:40AugustoMauchDescription Updatedbug_revision_view_page.php?rev_id=19326#r19326
2019-08-23 14:20hgbotCheckin
2019-08-23 14:20hgbotNote Added: 0114249
2019-08-23 14:20hgbotStatusnew => resolved
2019-08-23 14:20hgbotResolutionopen => fixed
2019-08-23 14:20hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e257d8e482d8931c581b379ff95c56ca050b8c9b [^]
2019-08-23 14:21AugustoMauchReview Assigned To => caristu
2019-08-25 06:50hudsonbotCheckin
2019-08-25 06:50hudsonbotNote Added: 0114261
2019-08-29 14:57caristuNote Added: 0114334
2019-08-29 14:57caristuStatusresolved => new
2019-08-29 14:57caristuResolutionfixed => open
2019-09-02 11:05hgbotCheckin
2019-09-02 11:05hgbotNote Added: 0114354
2019-09-02 11:13AugustoMauchStatusnew => scheduled
2019-09-02 11:13AugustoMauchFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/e257d8e482d8931c581b379ff95c56ca050b8c9b [^] => https://code.openbravo.com/erp/devel/pi/rev/f8c27555c37ca9951d4a7227b20d5daed06ddfc7 [^]
2019-09-02 11:13AugustoMauchStatusscheduled => resolved
2019-09-02 11:13AugustoMauchResolutionopen => fixed
2019-09-02 16:01hudsonbotCheckin
2019-09-02 16:02hudsonbotNote Added: 0114365
2019-09-02 19:02caristuNote Added: 0114366
2019-09-02 19:02caristuStatusresolved => closed
2019-09-02 19:02caristuFixed in Version => 3.0PR19Q4
2019-11-12 16:12alostaleStatusclosed => new
2019-11-12 16:12alostaleResolutionfixed => open
2019-11-12 16:12alostaleFixed in Version3.0PR19Q4 =>
2019-11-12 16:12alostaleSeverityminor => critical
2019-11-12 16:12alostaleStatusnew => scheduled
2019-11-12 16:13alostaleStatusscheduled => resolved
2019-11-12 16:13alostaleFixed in Version => 3.0PR19Q4
2019-11-12 16:13alostaleResolutionopen => fixed
2019-11-12 16:13alostaleStatusresolved => closed

Notes
(0114249)
hgbot   
2019-08-23 14:20   
Repository: erp/devel/pi
Changeset: e257d8e482d8931c581b379ff95c56ca050b8c9b
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Fri Aug 23 14:18:44 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e257d8e482d8931c581b379ff95c56ca050b8c9b [^]

Fixes issue 41684: Extra widget instances are no longer created

The process that automatically creates widget instances for default widgets was not taking into
account if the user had access to the copied widget class.

---
M modules/org.openbravo.client.myob/src/org/openbravo/client/myob/MyOpenbravoComponent.java
---
(0114261)
hudsonbot   
2019-08-25 06:50   
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/2915449dde15 [^]
Maturity status: Test
(0114334)
caristu   
2019-08-29 14:57   
Reopened due to minor code clean-up improvement:

This if clause[1] does not longer apply, because the fix for the issue is already checking the same.

[1] https://code.openbravo.com/erp/devel/pi/file/e257d8e482d8/modules/org.openbravo.client.myob/src/org/openbravo/client/myob/MyOpenbravoComponent.java#l319 [^]
(0114354)
hgbot   
2019-09-02 11:05   
Repository: erp/devel/pi
Changeset: f8c27555c37ca9951d4a7227b20d5daed06ddfc7
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Sep 02 11:04:38 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/f8c27555c37ca9951d4a7227b20d5daed06ddfc7 [^]

Related with issue 41684: Removes unneeded if clause

An if clause has been removed, it was not needed because an equivalent conditions is already
being checked.

Removed if clause:

 if (accessibleWidgetClasses.contains(copy.getWidgetClass().getId())) {

Break statement:

      if (!accessibleWidgetClasses.contains(defaultWidget.getWidgetClass().getId())) {
        // do not copy a widget if its widget class is not accessible
        continue;
      }

---
M modules/org.openbravo.client.myob/src/org/openbravo/client/myob/MyOpenbravoComponent.java
---
(0114365)
hudsonbot   
2019-09-02 16:01   
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/dc549ccd3ceb [^]
Maturity status: Test
(0114366)
caristu   
2019-09-02 19:02   
Reviewed