Project

General

Profile

Actions

Feature #2701

closed

Support to generate an anonymized username (abc123456)

Added by Alena Peterová almost 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
High
Assignee:
Ondrej Husník
Category:
Generating values
Target version:
Start date:
03/02/2021
Due date:
% Done:

100%

Estimated time:
16.00 h
Owner:

Description

Some projects use a username generator, which is independent of first name or last name of the identity.
We would like to set a standard generator:
  • specify prefix (some constant value, or none)
  • specify a length of the random number
  • the generator creates a username, which contains prefix+number and it's unique among identities in IdM
Actions #2

Updated by Radek Tomiška almost 4 years ago

  • Assignee changed from Ondřej Kopr to Ondrej Husník
  • Estimated time set to 16.00 h
Actions #3

Updated by Radek Tomiška almost 4 years ago

  • Priority changed from Normal to High
Actions #4

Updated by Ondrej Husník almost 4 years ago

  • Status changed from New to In Progress
Actions #5

Updated by Ondrej Husník almost 4 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondrej Husník to Vít Švanda
  • % Done changed from 0 to 90
Actions #6

Updated by Ondrej Husník almost 4 years ago

I discovered a wrong behavior of this feature in the case when there are used two usernames like this: anonymous_03 and anonymous_3. They were treated as same values which was not correct. Now it's fixed here. Some more tests were also added.
https://github.com/bcvsolutions/CzechIdMng/commit/d0c20ddce5d43cd1998a5e68540ff7b4bd869113

Actions #7

Updated by Vít Švanda over 3 years ago

  • Status changed from Needs feedback to In Progress
  • Assignee changed from Vít Švanda to Ondrej Husník
  • % Done changed from 90 to 100

I did review and tested it. Works very well with robust algoritm. Thanks for that.

Minor review notes:
  • Use a metamodel constant instead string in IdentityAnonymousUsernameGenerator:121 ("PageRequest.of(pageNum, pageSize, Sort.by("username").ascending()));").
  • The "createUsername" method does not have the linker parameter mentioned in JavaDoc.
Actions #8

Updated by Ondrej Husník over 3 years ago

  • Status changed from In Progress to Needs feedback
  • Assignee changed from Ondrej Husník to Vít Švanda

Here are changes based on your review. Also fixed some warnings from Sonar.

https://github.com/bcvsolutions/CzechIdMng/commit/b70551339a7724902c37ad8fe328e56b650c41b7

Actions #9

Updated by Vít Švanda over 3 years ago

  • Status changed from Needs feedback to Resolved
  • Assignee changed from Vít Švanda to Ondrej Husník

LGTM

Actions #10

Updated by Radek Tomiška over 3 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF