Bookmark RBS + Dynamic PGO (#1503)
* Allow .NET to optimize code as it's running. * Implemented the ability to restrict users Bookmark ability. By default, users will need to now opt-in to get bookmark roles. * Fixed a tachiyomi progress syncing logic bug
This commit is contained in:
parent
30500a441c
commit
2283ae5d61
14 changed files with 75 additions and 28 deletions
|
|
@ -32,6 +32,7 @@ public class OpdsController : BaseApiController
|
|||
private readonly ICacheService _cacheService;
|
||||
private readonly IReaderService _readerService;
|
||||
private readonly ISeriesService _seriesService;
|
||||
private readonly IAccountService _accountService;
|
||||
|
||||
|
||||
private readonly XmlSerializer _xmlSerializer;
|
||||
|
|
@ -65,7 +66,8 @@ public class OpdsController : BaseApiController
|
|||
|
||||
public OpdsController(IUnitOfWork unitOfWork, IDownloadService downloadService,
|
||||
IDirectoryService directoryService, ICacheService cacheService,
|
||||
IReaderService readerService, ISeriesService seriesService)
|
||||
IReaderService readerService, ISeriesService seriesService,
|
||||
IAccountService accountService)
|
||||
{
|
||||
_unitOfWork = unitOfWork;
|
||||
_downloadService = downloadService;
|
||||
|
|
@ -73,6 +75,7 @@ public class OpdsController : BaseApiController
|
|||
_cacheService = cacheService;
|
||||
_readerService = readerService;
|
||||
_seriesService = seriesService;
|
||||
_accountService = accountService;
|
||||
|
||||
_xmlSerializer = new XmlSerializer(typeof(Feed));
|
||||
_xmlOpenSearchSerializer = new XmlSerializer(typeof(OpenSearchDescription));
|
||||
|
|
@ -619,7 +622,7 @@ public class OpdsController : BaseApiController
|
|||
if (!(await _unitOfWork.SettingsRepository.GetSettingsDtoAsync()).EnableOpds)
|
||||
return BadRequest("OPDS is not enabled on this server");
|
||||
var user = await _unitOfWork.UserRepository.GetUserByIdAsync(await GetUser(apiKey));
|
||||
if (!await _downloadService.HasDownloadPermission(user))
|
||||
if (!await _accountService.HasDownloadPermission(user))
|
||||
{
|
||||
return BadRequest("User does not have download permissions");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue