diff --git a/Bootstrap.Admin/Controllers/Api/UsersController.cs b/Bootstrap.Admin/Controllers/Api/UsersController.cs index b7477cf8..7f67c7d8 100644 --- a/Bootstrap.Admin/Controllers/Api/UsersController.cs +++ b/Bootstrap.Admin/Controllers/Api/UsersController.cs @@ -33,16 +33,13 @@ namespace Bootstrap.Admin.Controllers.Api [HttpPut] public bool Put([FromBody]User value) { + if (User.IsInRole("Administrators")) return false; + + var ret = false; if (value.UserStatus == 3) { return UserHelper.SaveUserCssByName(value.UserName, value.Css); } - if (value.UserStatus == 9) - { - // vlaidate userName - return BootstrapUser.RetrieveUserByUserName(value.UserName) == null && !UserHelper.RetrieveNewUsers().Any(u => u.UserName == value.UserName); - } - var ret = false; if (value.UserName.Equals(User.Identity.Name, System.StringComparison.OrdinalIgnoreCase)) { if (value.UserStatus == 1) diff --git a/Bootstrap.Admin/Views/Admin/Profiles.cshtml b/Bootstrap.Admin/Views/Admin/Profiles.cshtml index 043691c0..54fb45d6 100644 --- a/Bootstrap.Admin/Views/Admin/Profiles.cshtml +++ b/Bootstrap.Admin/Views/Admin/Profiles.cshtml @@ -44,8 +44,8 @@ -
@@ -54,7 +54,7 @@