Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to notes being customised #782

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

Sae126V
Copy link
Contributor

@Sae126V Sae126V commented Jun 6, 2024

No description provided.

@Sae126V Sae126V marked this pull request as ready for review June 6, 2024 07:29
@Sae126V Sae126V modified the milestone: v1.8.3 Jun 6, 2024
@enricovianello enricovianello linked an issue Jun 14, 2024 that may be closed by this pull request
@rmiccoli
Copy link
Contributor

Perhaps we can put an if statement in the email template (adminHandleRequest.ftl) so that notes are only shown if the content is not empty.
e.g.

<#if notes?has_content>
Notes:
${notes}
</#if>

@Sae126V
Copy link
Contributor Author

Sae126V commented Jul 4, 2024

Perhaps we can put an if statement in the email template (adminHandleRequest.ftl) so that notes are only shown if the content is not empty. e.g.

<#if notes?has_content>
Notes:
${notes}
</#if>

Ahh! You are right @rmiccoli 👍 . Added in 14800ca

Copy link

sonarcloud bot commented Jul 4, 2024

Copy link
Member

@enricovianello enricovianello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started the review and mainly the big change suggested is to use an implementation of the RequestValidatorService instead of adding the validation logic into the DefaultRegistrationRequestService. I know I'm a bit annoying but I'd prefer to keep things separated, having something similar already done for CERN purposes.

@@ -154,6 +154,9 @@ iam:
oidc-issuer: ${IAM_REGISTRATION_OIDC_ISSUER:https://example.org}
saml-entity-id: ${IAM_REGISTRATION_SAML_ENTITY_ID:urn:example}
add-nickname-as-attribute: ${IAM_ADD_NICKNAME_AS_ATTRIBUTE:false}
fields:
notes:
field-behaviour: ${IAM_REGISTRATION_NOTES_FIELD_BEHAVIOUR:mandatory}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add this env variable we should add also the others: IAM_REGISTRATION_GIVEN_NAME_BEHAVIOUR, etc. I think we can avoid adding these lines and keep the default value as MANDATORY on this line https://github.com/indigo-iam/iam/pull/782/files#diff-eb3a40a655172a85a4ebaccf2dba240d9b4f294761e61a5631af9892aa95a49fR206

Copy link

sonarcloud bot commented Aug 13, 2024

@rmiccoli
Copy link
Contributor

Note that recently this check https://github.com/Sae126V/iam/blob/issue-759-registration-ui/iam-login-service/src/main/java/it/infn/mw/iam/registration/RegistrationRequestDto.java#L97 has been added for the Notes field and I saw it is already merged in this PR. I think this check should be removed otherwise the behavior of the optional or hidden Notes field does not work as it should.

- Fix an issue with cern profile doing notes sanity check
Copy link

sonarcloud bot commented Oct 18, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User registration form "Notes" field usability issue
3 participants