Commit Graph
5 Commits
Author SHA1 Message Date
Alessandro Agostini d5acf2dc41 Email confirmation fail on multiple confirmation attempts (#8656)
If an user already confirmed his email address and tries to confirm it again it should fail.
2023-03-17 09:12:18 +01:00
Alessandro AgostiniandAndrea Piovanelli c515ce1917 Added Username policies (#8638)
* Added Username policies

* Added newline at the end of files

# Conflicts:
#	src/Orchard.Web/Modules/Orchard.Users/Services/AccountValidationService.cs

* Added check for username length that must be under 255 characters (even if username policies are disabled).
If username isn't modified, policies are not enforced when saving the user inside backoffice.
Default length limits are 1 and 255.

* Added UsernameValidationError.cs
Added a setting to bypass non fatal errors and show them as warning when creating/editing users from the backoffice
Added the relative checkbox in RegistrationSettings.cshtml
Modified the UsernameMeetsPolicies method to use the new class
Modified AdminController (CreatePOST, EditPOST) and AccountController (Register)

* If username is an email check that it matches the specified email

* Added hints to UserRegistrationSettings view
Changed the severity of some custom policies errors

* Removed UsernameValidLengthAttribute.cs, if MinimumUsernameLength and MaximumUsernameLength settings don't make sense these settings are ignored

* bugfix. The admin could change the a username setting an already existing username.

Co-authored-by: Andrea Piovanelli <andrea.piovanelli@laser-group.com>
2023-01-27 11:23:22 +01:00
Alessandro Agostini 7bf78ef852 check the culture is supported (#8646)
* check the culture is supported

* changed == to equals
2023-01-20 12:12:24 +01:00
Alessandro AgostiniandAndrea Piovanelli 2a1b0b3af3 Added hints to show technical names in list of content types and content field definition edit (#8640)
* Added hint in EditField view

* Added hint to EditTypeViewModel.cshtml to show technical name in list of content types

* fixed typo

* Clarified hint displaying technical name.

Co-authored-by: Andrea Piovanelli <andrea.piovanelli@laser-group.com>
2022-12-06 09:26:34 +01:00
Alessandro Agostini ba5873aece Fix for issue 8631: field values are reset when imported (#8632)
* If there is nothing to import for MediaLibraryPickerField and ContentPickerField, the field doesn't need to be reset.

* Checked the presence of the field inside the import context to avoid resetting the field value even if the field isn't imported.
This applies to ContentPickerField, MediaLibraryPickerField and NumericField.
2022-10-14 08:57:44 +02:00