User management work

This commit is contained in:
Jamie.Rees 2016-10-25 14:20:27 +01:00
commit 0828756171
10 changed files with 209 additions and 57 deletions

View file

@ -118,6 +118,12 @@ namespace PlexRequests.Core
return new Guid(userRecord.UserGuid);
}
public void DeleteUser(string userId)
{
var user = Repo.Get(userId);
Repo.Delete(user);
}
public Guid? CreateAdmin(string username, string password, UserProperties properties = null)
{
return CreateUser(username, password, new[] { UserClaims.User, UserClaims.PowerUser, UserClaims.Admin }, properties);
@ -193,7 +199,7 @@ namespace PlexRequests.Core
Guid? CreateAdmin(string username, string password, UserProperties properties = null);
Guid? CreatePowerUser(string username, string password, UserProperties properties = null);
Guid? CreateRegularUser(string username, string password, UserProperties properties = null);
void DeleteUser(string userId);
}
}