Small amount of work on the user management

This commit is contained in:
tidusjar 2016-08-18 17:31:50 +01:00
parent 46a63f48c4
commit 2a6f928902
7 changed files with 377 additions and 18 deletions

View file

@ -20,8 +20,9 @@ namespace PlexRequests.UI.Modules
{
public UserManagementModule(ISettingsService<PlexRequestSettings> pr, ICustomUserMapper m, IPlexApi plexApi, ISettingsService<PlexSettings> plex) : base("usermanagement", pr)
{
//this.RequiresClaims(UserClaims.Admin);
#if !DEBUG
this.RequiresClaims(UserClaims.Admin);
#endif
UserMapper = m;
PlexApi = plexApi;
PlexSettings = plex;
@ -29,7 +30,7 @@ namespace PlexRequests.UI.Modules
Get["/"] = x => Load();
Get["/users", true] = async (x, ct) => await LoadUsers();
Post["/createuser"] = x => CreateUser(Request.Form["userName"].ToString(), Request.Form["password"].ToString());
Post["/createuser"] = x => CreateUser(Request.Form["username"].ToString(), Request.Form["password"].ToString());
Get["/local/{id}"] = x => LocalDetails((Guid)x.id);
Get["/plex/{id}", true] = async (x,ct) => await PlexDetails(x.id);
}