Project

General

Profile

Actions

Task #2171

closed

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

Added by Radek Tomiška over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Vít Švanda
Category:
Report
Target version:
Start date:
03/31/2020
Due date:
% Done:

100%

Estimated time:
Owner:

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 IdStory Identity Manager - Task #2069: General report to export tables to csvClosedPeter Štrunc02/19/2020

Actions
Actions #1

Updated by Radek Tomiška over 4 years ago

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

Updated by Vít Švanda over 4 years ago

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

Updated by Vít Švanda over 4 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Vít Švanda over 4 years 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

Actions #5

Updated by Vít Švanda over 4 years ago

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

Updated by Radek Tomiška over 4 years 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

Actions #7

Updated by Vít Švanda over 4 years 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

Actions #8

Updated by Radek Tomiška over 4 years 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.

Actions #9

Updated by Vít Švanda over 4 years ago

Actions #10

Updated by Radek Tomiška over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF