add user permissions for managing tv recordings

This commit is contained in:
Luke Pulverenti
2014-01-13 15:31:09 -05:00
parent c822bfc0cd
commit e206f27839
11 changed files with 81 additions and 21 deletions

View File

@@ -81,6 +81,14 @@ namespace MediaBrowser.Api
return GetAuthorization(auth);
}
public static User GetCurrentUser(IRequest httpReq, IUserManager userManager)
{
var info = GetAuthorization(httpReq);
return string.IsNullOrEmpty(info.UserId) ? null :
userManager.GetUserById(new Guid(info.UserId));
}
/// <summary>
/// Gets the authorization.
/// </summary>