obiba / agate

OBiBa's user ID provider.
GNU General Public License v3.0
4 stars 7 forks source link

Bug - Username with space issue #521

Closed massej closed 9 months ago

massej commented 9 months ago

Describe the bug When a user create a username with a space, it create issue with mica.

To Reproduce Steps to reproduce the behavior:

Create a username with a space at the end.

Expected behavior The space should be trimmed or removed on creation.

Screenshots

image

In mica the association doesnt work (only username and fullname is showed without the lastname (the lastname is lost))

image

Here is a working example : (You also have all the user info in mica)

image

The user cannot do amendement due to this line https://github.com/obiba/mica2/blob/9b26a7adef5a185b85f3a43c5cf5aef725fe13a8/mica-webapp/src/main/resources/_templates/libs/data-access-sidebar.ftl#L141

<#if feasibilities?size != 0 || user.username == dar.applicant || isAdministrator>

it compare the username with a space and dar.applicant without space and cause issue.

Thank you for your help,

ymarcon commented 9 months ago

Fixed and released (includes an automated upgrade step that will trim the user names and emails if necessary) , thanks for the report.

massej commented 9 months ago

Thank you @ymarcon you're the best!