billchen198318 / bamboobsc

next version move to https://github.com/billchen198318/hillfog, bambooBSC is an opensource Balanced Scorecard (BSC) Business Intelligence (BI) Web platform. BSC's Vision, Perspectives, Objectives of strategy, Key Performance Indicators (KPIs), Strategy Map, and SWOT, PDCA & PDCA report, Time Series Analysis.
Apache License 2.0
227 stars 110 forks source link

update permission (BSC_PROG002D0004E) for 04 - KPI not working #60

Closed abdelazizelesh closed 6 years ago

abdelazizelesh commented 6 years ago

i added BSC_PROG002D0004E to a new role, when i click save, no permission message raised. when i added BSC_PROG002D0003E, save done successfully. image

Thanks

billchen198318 commented 6 years ago

You maybe no to do Role's permitted settings, recommed use Role copy as new. and modify this new role. because need add many permitted item.

https://github.com/billchen198318/bamboobsc/blob/master/core-doc/dev-docs/06-RoleAndAuthoritySettings.md#roles-permitted-settings


the authority has for Controller and for LogicService


@ControllerMethodAuthority for Controller

https://github.com/billchen198318/bamboobsc/blob/master/core-doc/dev-docs/04-ControllerAction.md#basejsonaction ( view Controller annotation )


@ServiceMethodAuthority for LogicService

https://github.com/billchen198318/bamboobsc/blob/master/core-doc/dev-docs/03-LogicService.md#logic-service-authority-annotation

https://github.com/billchen198318/bamboobsc/blob/master/core-doc/dev-docs/03-LogicService.md#add-logic-service-authority


or use SQL command find the BSC_PROG002D0004E Controller permitte are has found in the new role.

select ROLE from tb_role_permission where PERM_TYPE = 'CONTROLLER' and PERMISSION = 'BSC_PROG002D0004E' 

find LogicService permitte

select ROLE from tb_role_permission where PERM_TYPE = 'COMPOMENT' and PERMISSION = 'bsc.service.logic.KpiLogicService#INSERT';

select ROLE from tb_role_permission where PERM_TYPE = 'COMPOMENT' and PERMISSION = 'bsc.service.logic.KpiLogicService#UPDATE';

select ROLE from tb_role_permission where PERM_TYPE = 'COMPOMENT' and PERMISSION = 'bsc.service.logic.KpiLogicService#DELETE';

I modify change KpiSaveOrUpdateAction.java ( https://github.com/billchen198318/bamboobsc/commit/d2c20ef56c292f03b3b1a4f0adefc713f865c629 ) doUpdate and doSave two method programId to real ok value, and use tester ( BSC_STANDARD role ) are success create and update, delete KPI data. I think the no permission message, is no to do Role's permitted settings with you new role.