aboutsummaryrefslogtreecommitdiff
path: root/src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs
diff options
context:
space:
mode:
authortranstrike <transtrike@gmail.com>2021-01-26 11:44:41 +0200
committertranstrike <transtrike@gmail.com>2021-01-26 11:44:41 +0200
commitdf52b1068e16adc50ffd365e2e8b8ea19b59fac3 (patch)
tree3636d4b3fe2d5f88817b11007ff573c1ea920e0a /src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs
parentd2bc08c0dcd6f0dc0822333bbb00c9fc851f49cb (diff)
downloadDevHive-df52b1068e16adc50ffd365e2e8b8ea19b59fac3.tar
DevHive-df52b1068e16adc50ffd365e2e8b8ea19b59fac3.tar.gz
DevHive-df52b1068e16adc50ffd365e2e8b8ea19b59fac3.zip
UserUpdate does not allow updating roles if not admin; HTTP Put now works properly; UserUpdate validates properly
Diffstat (limited to 'src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs')
-rw-r--r--src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs b/src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs
index 254affc..3870481 100644
--- a/src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs
+++ b/src/DevHive.Web/Models/Identity/Role/UpdateRoleWebModel.cs
@@ -4,10 +4,12 @@ using System.Diagnostics.CodeAnalysis;
namespace DevHive.Web.Models.Identity.Role
{
- public class UpdateRoleWebModel : RoleWebModel
+ public class UpdateRoleWebModel
{
[NotNull]
[Required]
- public Guid Id { get; set; }
+ [MinLength(3)]
+ [MaxLength(50)]
+ public string Name { get; set; }
}
}