sync updates

This commit is contained in:
Luke Pulverenti
2015-03-31 12:24:16 -04:00
parent eaf70589ae
commit a025f4eefa
24 changed files with 366 additions and 133 deletions

View File

@@ -73,6 +73,17 @@ namespace MediaBrowser.Api
return ResultFactory.GetOptimizedResultUsingCache(Request, cacheKey, lastDateModified, cacheDuration, factoryFn);
}
/// <summary>
/// Infers the server address from the url
/// </summary>
/// <returns></returns>
protected string GetServerAddress()
{
var index = Request.AbsoluteUri.IndexOf(Request.PathInfo, StringComparison.OrdinalIgnoreCase);
return Request.AbsoluteUri.Substring(0, index);
}
protected void AssertCanUpdateUser(IUserManager userManager, string userId)
{
var auth = AuthorizationContext.GetAuthorizationInfo(Request);