Project

General

Profile

Task #2171

General report to export tables: auto bulk action registration for all formable entites.

Added by Radek Tomiška 8 months ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Report
Target version:
Start date:
03/31/2020
Due date:
% Done:

100%

Estimated time:
Milestones:

Description

IdmIdentityGeneralEntityExport, IdmRoleGeneralEntityExport, SysSystemGeneralEntityExport were added to support export tables into csv. Remove this components and register feature dynamically for all formable entites by default (e.g. can be disabled by application (bulk action) configuration).


Related issues

Related to CzechIdM - Task #2069: General report to export tables to csvClosed02/19/2020

History

#1 Updated by Radek Tomiška 8 months ago

  • Related to Task #2069: General report to export tables to csv added

#2 Updated by Vít Švanda 8 months ago

  • Assignee changed from Radek Tomiška to Vít Švanda

#3 Updated by Vít Švanda 7 months ago

  • Status changed from New to In Progress

#4 Updated by Vít Švanda 7 months ago

Implemented.

I do not generate beans for every entity type, but I created one universal GeneralEntityExport and this bulk action will be available for all formable entities (with bulk action supports).
Main solution was in modification of the "supports" method. That bulk action is supports for every formable entity.

Classes IdmIdentityGeneralEntityExport, IdmRoleGeneralEntityExport, SysSystemGeneralEntityExport were deleted.

All changes are in branche "pstrunc/2069"

Commit: https://github.com/bcvsolutions/CzechIdMng/commit/b77dd39a5227526d2ae1a2af4e88ce56df0e8a3f

#5 Updated by Vít Švanda 7 months ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Vít Švanda to Radek Tomiška

#6 Updated by Radek Tomiška 7 months ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Radek Tomiška to Vít Švanda
  • % Done changed from 0 to 70

I did test and code review, i've found one issue with security - exports ara available without authority is needed, because action is always 'null' on row GeneralEntityExport#100. I've changed this to return 'APP_ADMIN' instead, because is already in develop (sorry for merge it to early) => so normal user without 'APP_ADMIN' doesn't see report now. Could you check and fix this issue please?

Other review notes:
- GeneralEntityExport - AuthorizableService#getAuthorizableType() method could return null (e.g. DefaultIdmConceptRoleRequestService#getAuthorizableType()) - i've added check for null pointer.
- GeneralEntityExport#lookupService - added private modifier.
- GeneralEntityExport#getService() - removed generated LOG - added final static.

All notes are implemented in commit:
https://github.com/bcvsolutions/CzechIdMng/commit/d9504c85011047f10697df1d5cc39250ab92cd35

#7 Updated by Vít Švanda 7 months ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Vít Švanda to Radek Tomiška
  • % Done changed from 70 to 90

You have right, getAvailableActions returned actions in every situtation. That method worked with singleton beans and there was no way how to set entity class to generic action.

I redesigned that and new bean is created in getAvailableActions too. For performance reason I creates new bean instance only for this new action (new property isGeneric was added to AbstractBulkAction for it).

Commit: https://github.com/bcvsolutions/CzechIdMng/commit/c2e4ab1758ed03f96fa55870cfc23f4a2832c220

#8 Updated by Radek Tomiška 7 months ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Radek Tomiška to Vít Švanda
  • % Done changed from 90 to 100

It works, thx!

Note:
New public methods added to AbstractBulkAction should be in API (IdmBulkAction), but manager doesn't work with this API anyway.

#10 Updated by Radek Tomiška 7 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Go to top