Merge pull request 'refs #5769 fix(web-access): email rule' (!1684) from 5769-hotFix_client_web-access_email2 into master
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #1684
Reviewed-by: Vicent Llopis <vicent@verdnatura.es>
This commit is contained in:
Alex Moreno 2023-07-21 10:43:32 +00:00
commit b400e1983a
3 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@ module.exports = Self => {
const user = await Self.findById(userId, {fields: ['hasGrant']}, myOptions); const user = await Self.findById(userId, {fields: ['hasGrant']}, myOptions);
const userToUpdate = await Self.findById(id, { const userToUpdate = await Self.findById(id, {
fields: ['id', 'name', 'hasGrant', 'roleFk', 'password'], fields: ['id', 'name', 'hasGrant', 'roleFk', 'password', 'email'],
include: { include: {
relation: 'role', relation: 'role',
scope: { scope: {

View File

@ -20,7 +20,7 @@ module.exports = function(Self) {
Self.validatesFormatOf('email', { Self.validatesFormatOf('email', {
message: 'Invalid email', message: 'Invalid email',
allowNull: true, allowNull: true,
allowBlank: true, allowBlank: false,
with: /^[\w|.|-]+@[\w|-]+(\.[\w|-]+)*(,[\w|.|-]+@[\w|-]+(\.[\w|-]+)*)*$/ with: /^[\w|.|-]+@[\w|-]+(\.[\w|-]+)*(,[\w|.|-]+@[\w|-]+(\.[\w|-]+)*)*$/
}); });

View File

@ -39,7 +39,7 @@
label="Recovery email" label="Recovery email"
ng-model="$ctrl.account.email" ng-model="$ctrl.account.email"
info="This email is used for user to regain access their account." info="This email is used for user to regain access their account."
rule="VnUser.name"> rule="VnUser.email">
</vn-textfield> </vn-textfield>
</vn-horizontal> </vn-horizontal>
</vn-card> </vn-card>