Skip to content

Commit

Permalink
Just more consistency.
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Aug 3, 2023
1 parent 6d0ace5 commit c45d3c7
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 22 deletions.
2 changes: 1 addition & 1 deletion backend/src/Squidex.Domain.Users/UserManagerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void SyncBoolean(string type, bool? value)
SyncString(SquidexClaimTypes.DisplayName, values.DisplayName);
SyncString(SquidexClaimTypes.PictureUrl, values.PictureUrl);

SyncBoolean(SquidexClaimTypes.Hidden, values.Hidden);
SyncBoolean(SquidexClaimTypes.Hidden, values.IsHidden);
SyncBoolean(SquidexClaimTypes.Invited, values.Invited);
SyncBoolean(SquidexClaimTypes.Consent, values.Consent);
SyncBoolean(SquidexClaimTypes.ConsentForEmails, values.ConsentForEmails);
Expand Down
2 changes: 1 addition & 1 deletion backend/src/Squidex.Domain.Users/UserValues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public sealed class UserValues

public string Email { get; set; }

public bool? Hidden { get; set; }
public bool? IsHidden { get; set; }

public bool? Invited { get; set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// ==========================================================================

using Squidex.Domain.Users;
using Squidex.Infrastructure.Reflection;
using Squidex.Infrastructure.Security;
using Squidex.Infrastructure.Validation;
using Squidex.Web;
Expand Down Expand Up @@ -42,12 +43,6 @@ public sealed class CreateUserDto

public UserValues ToValues()
{
return new UserValues
{
Email = Email,
DisplayName = DisplayName,
Password = Password,
Permissions = new PermissionSet(Permissions)
};
return SimpleMapper.Map(this, new UserValues { Permissions = new PermissionSet(Permissions) });
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// ==========================================================================

using Squidex.Domain.Users;
using Squidex.Infrastructure.Reflection;
using Squidex.Web;

namespace Squidex.Areas.Api.Controllers.Users.Models;
Expand All @@ -20,9 +21,6 @@ public sealed class UpdateProfileDto

public UserValues ToValues()
{
return new UserValues
{
Answers = Answers
};
return SimpleMapper.Map(this, new UserValues());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
// ==========================================================================

using Squidex.Domain.Users;
using Squidex.Infrastructure.Reflection;
using Squidex.Infrastructure.Security;
using Squidex.Infrastructure.Validation;
using Squidex.Web;
Expand Down Expand Up @@ -41,12 +42,6 @@ public sealed class UpdateUserDto

public UserValues ToValues()
{
return new UserValues
{
Email = Email,
DisplayName = DisplayName,
Password = Password,
Permissions = new PermissionSet(Permissions)
};
return SimpleMapper.Map(this, new UserValues { Permissions = new PermissionSet(Permissions) };
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// ==========================================================================
// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschraenkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================

using Squidex.Domain.Users;
using Squidex.Infrastructure.Reflection;
using Squidex.Infrastructure.Validation;

namespace Squidex.Areas.IdentityServer.Controllers.Profile;
Expand All @@ -22,6 +23,6 @@ public class ChangeProfileModel

public UserValues ToValues()
{
return new UserValues { Email = Email, DisplayName = DisplayName, Hidden = IsHidden };
return SimpleMapper.Map(this, new UserValues());
}
}

0 comments on commit c45d3c7

Please sign in to comment.