Project

General

Profile

Actions

Feature #2399

closed

Add new entity, dto, etc for Card

Added by Roman Kučera almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Roman Kučera
Target version:
Start date:
07/23/2020
Due date:
% Done:

100%

Estimated time:
Owner:

Description

This module will support cards.
You will be able to manage cards and manage certificates which should be assigned to specific card.
Each certificate can be assigned only to one card.
Each card can have multiple certificates.

Certificate can exist without card = backward compatibility.
Agenda with card will have configuration property for turning it of.

Create entity, dto, service, rest, agenda on FE.

Actions #1

Updated by Roman Kučera almost 4 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 10

implementation is in https://git.bcvsolutions.eu/modules/crt/commits/2399-card-support

Create entity, dto, repository, permissions, filters, events api, service for cards.

Actions #2

Updated by Roman Kučera almost 4 years ago

  • % Done changed from 10 to 30

BE green line should be finished. Started with FE, new tab created, managers, services.
Next step is to create card from FE

Actions #3

Updated by Roman Kučera almost 4 years ago

  • % Done changed from 30 to 70

FE agenda for cards created.
Creating removing of cards working.
Implemented detail for cards and adding/removing certificates to/from card.
Implemented integrity in processor so when card is deleted associations are removed to.
Implemented same integrity for disable and remove user as for certificate. that's mean revoke card and delete.

Need to be tested/fixed updating of card and FE labels in flesh messages. Permission need to be tested to.

Actions #4

Updated by Roman Kučera almost 4 years ago

  • % Done changed from 70 to 80

Added cards tab to user detail.
Fixed assigning certificates to cards.
Added some hard filters + BE validation to be able to add only certificate which has the same owner as the card and if certificate is not already assigned to another card.
Fixed all messages on FE.

TODO - documentation and tests.

Actions #6

Updated by Roman Kučera over 3 years ago

  • % Done changed from 80 to 90

Added tests

Actions #7

Updated by Roman Kučera over 3 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Roman Kučera to Vít Švanda
Actions #8

Updated by Vít Švanda over 3 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Vít Švanda to Roman Kučera
  • Target version set to 2.3.0

I did review and tested it. Code looks very nice. I found some issues, but basically works well, good job.

  • FE - If I try to create new CardCrtification, then is throw this exception "EntityNotFoundException: Entity type [eu.bcvsolutions.idm.crt.entity.CrtCardCertificate] with id [undefined] not found."
  • BE - If I try to create new CardCrtification, then on select of a owner is throw this exception (FilterNotSupportedException: Filter for property [owner] for entity [CrtCertificate] is not supported and cannot be used.). I think you have disabled check for this on your environment (idm.sec.core.filter.check.supported.enabled). Main problem will be in name of filter property (owner vs ownerId).
  • BE - CrtCardFilter - You mix the definition by field and static property. Please use only static way (you copied CrtCardFilter very well, but you missed the "todo" ;-) ).
  • FE - Card detail - The back link works strange (I expecting redirect to the last route).
  • FE - Card detail - You allow select only valid owners (no disabled). I recommend allow selecting of a disabled identity too (or maybe you have extra motivation for this .. let me know).
  • FE - Card detail - UX - not important, but I expects select of a owner as first item no the form (now is last).
  • BE - Flyscripts for MSSQL missing. I know, in this module is none scripts for MSSQL yet. Are you sure, a projects wich will using your cards, working on the PostresSQL only?
  • BE - CrtCardCertificate - index 'idx_crt_card_certificate_certificate' is too long (max is 30 chars ... for support in Oracle).
  • BE - DefaultCrtCardService, DefaultCrtCardService - missing java doc.
  • FE - Your new classes contains linter exceptions, please solve them. Linter definition (.eslintrc) is obsolet in CRT module. Please use definition from acc module.
  • DOC - Permission definition missing in wiki.
Actions #9

Updated by Roman Kučera over 3 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Roman Kučera to Vít Švanda

Thx for review, I made following fixes.
Here you can see all the changes which I made https://git.bcvsolutions.eu/modules/crt/compare/f9142cf37b4867d493f9e2789e0ec47aa6a6360f...6876400331125d147702686c18828e9663430a87
Vít Švanda wrote:

I did review and tested it. Code looks very nice. I found some issues, but basically works well, good job.

  • FE - If I try to create new CardCrtification, then is throw this exception "EntityNotFoundException: Entity type [eu.bcvsolutions.idm.crt.entity.CrtCardCertificate] with id [undefined] not found." fixed
  • BE - If I try to create new CardCrtification, then on select of a owner is throw this exception (FilterNotSupportedException: Filter for property [owner] for entity [CrtCertificate] is not supported and cannot be used.). I think you have disabled check for this on your environment (idm.sec.core.filter.check.supported.enabled). Main problem will be in name of filter property (owner vs ownerId). After consultation fixed for certificates and requests
  • BE - CrtCardFilter - You mix the definition by field and static property. Please use only static way (you copied CrtCardFilter very well, but you missed the "todo" ;) ).- fixes
  • FE - Card detail - The back link works strange (I expecting redirect to the last route). fixed
  • FE - Card detail - You allow select only valid owners (no disabled). I recommend allow selecting of a disabled identity too (or maybe you have extra motivation for this .. let me know). fixed
  • FE - Card detail - UX - not important, but I expects select of a owner as first item no the form (now is last). fixed
  • BE - Flyscripts for MSSQL missing. I know, in this module is none scripts for MSSQL yet. Are you sure, a projects wich will using your cards, working on the PostresSQL only? I need only PostresSQL. It would be nice to add MSSQL scripts, but I am afraid I don't have time to do it together with this task.
  • BE - CrtCardCertificate - index 'idx_crt_card_certificate_certificate' is too long (max is 30 chars ... for support in Oracle). fixed
  • BE - DefaultCrtCardService, DefaultCrtCardService - missing java doc. fixed
  • FE - Your new classes contains linter exceptions, please solve them. Linter definition (.eslintrc) is obsolet in CRT module. Please use definition from acc module. fixed
  • DOC - Permission definition missing in wiki. fixed

https://wiki.czechidm.com/devel/documentation/modules_crt/adm/modules_crt#cards_administrator
https://wiki.czechidm.com/devel/documentation/modules_crt/adm/modules_crt#cards_administrator_with_the_possibility_to_assign_certificates_to_cards

Actions #10

Updated by Vít Švanda over 3 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Vít Švanda to Roman Kučera
  • % Done changed from 90 to 100

I did rereview.

Thanks for a fix the problem with filter check, because the main problem wasn't in your new code, but in the certificate agenda. Works nice now.

  • In the point FE - Your new classes contains linter exceptions, please solve them. Linter definition (.eslintrc) is obsolet in CRT module. Please use definition from acc module. - You updated linter definition, but you didn't fix a linter exceptions in your new classes.
  • You modified the flyway script. This caused that the application failed during start on my enviroment (check sum of the script and in the DB is not equals). I modified my DB, but be carefull with this in the future (generaly in the case when more users/developers can uses a previous version).

I found some new minor issues:

  • Nice label for CardCertificate didn't work (undefined was show on delete action).
  • Column owner in the card table is useless on identity detail.

I fixed everithing (I hope). My changes you can se here: https://git.bcvsolutions.eu/modules/crt/commit/71c191d386c87f2defbf2cd894f8c0fe1e8b003f

Actions #11

Updated by Vít Švanda over 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF