diff --git a/MediaBrowser.Api/UserService.cs b/MediaBrowser.Api/UserService.cs
index ec0b853c58..19bfb821ff 100644
--- a/MediaBrowser.Api/UserService.cs
+++ b/MediaBrowser.Api/UserService.cs
@@ -164,6 +164,17 @@ namespace MediaBrowser.Api
{
}
+ ///
+ /// Class CreateUser
+ ///
+ [Route("/Users/New", "POST", Summary = "Creates a user")]
+ [Authenticated]
+ public class CreateUserByName : IReturn
+ {
+ [ApiMember(Name = "Name", IsRequired = true, DataType = "string", ParameterType = "body", Verb = "POST")]
+ public string Name { get; set; }
+ }
+
///
/// Class UsersService
///
@@ -483,5 +494,21 @@ namespace MediaBrowser.Api
return ToOptimizedResult(result);
}
+
+ ///
+ /// Posts the specified request.
+ ///
+ /// The request.
+ /// System.Object.
+ public object Post(CreateUserByName request)
+ {
+ var dtoUser = request;
+
+ var newUser = _userManager.CreateUser(dtoUser.Name).Result;
+
+ var result = _userManager.GetUserDto(newUser, Request.RemoteIp);
+
+ return ToOptimizedResult(result);
+ }
}
}
diff --git a/MediaBrowser.Server.Implementations/Localization/Server/server.json b/MediaBrowser.Server.Implementations/Localization/Server/server.json
index 4e2913540c..0a06b7221e 100644
--- a/MediaBrowser.Server.Implementations/Localization/Server/server.json
+++ b/MediaBrowser.Server.Implementations/Localization/Server/server.json
@@ -1263,5 +1263,7 @@
"MessageNoServersAvailableToConnect": "No servers are available to connect to. If you've been invited to share a server, make sure to confirm it by clicking the link in the email.",
"TitleNewUser": "New User",
"ButtonConfigurePassword": "Configure Password",
- "HeaderDashboardUserPassword": "User passwords are managed within each user's personal profile settings."
+ "HeaderDashboardUserPassword": "User passwords are managed within each user's personal profile settings.",
+ "HeaderLibraryAccess": "Library Access",
+ "HeaderChannelAccess": "Channel Access"
}