add library access to new user page

pull/702/head
Luke Pulverenti 10 years ago
parent b1c9b224c4
commit a32fd710a9

@ -164,6 +164,17 @@ namespace MediaBrowser.Api
{
}
/// <summary>
/// Class CreateUser
/// </summary>
[Route("/Users/New", "POST", Summary = "Creates a user")]
[Authenticated]
public class CreateUserByName : IReturn<UserDto>
{
[ApiMember(Name = "Name", IsRequired = true, DataType = "string", ParameterType = "body", Verb = "POST")]
public string Name { get; set; }
}
/// <summary>
/// Class UsersService
/// </summary>
@ -483,5 +494,21 @@ namespace MediaBrowser.Api
return ToOptimizedResult(result);
}
/// <summary>
/// Posts the specified request.
/// </summary>
/// <param name="request">The request.</param>
/// <returns>System.Object.</returns>
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);
}
}
}

@ -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"
}

Loading…
Cancel
Save