Netcore: Package support for media + media types (#9547)
* Add support for media when installing a package * clean up * Fix tests * Add support for media when installing a package * clean up * Fix tests * moved tests + test data * Migrated package tests + resources * Fix issue with media picker on package page, was empty after save. * Added missing files * Fix casing issue of resources * Added test for media * Fix tests for linux * Fix test * Fix issue with move media.. * Fix issue with adding files to packages * Add MediaType permissions. * Fix test * Fix test * Retry flaky tests, and added TODOs to fix those * new attempt to fix test Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
This commit is contained in:
@@ -479,7 +479,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
{
|
||||
// Authorize...
|
||||
var requirement = new MediaPermissionsResourceRequirement();
|
||||
var authorizationResult = await _authorizationService.AuthorizeAsync(User, _mediaService.GetById(move.Id), requirement);
|
||||
var authorizationResult = await _authorizationService.AuthorizeAsync(User, new MediaPermissionsResource(_mediaService.GetById(move.Id)), requirement);
|
||||
if (!authorizationResult.Succeeded)
|
||||
{
|
||||
return Forbid();
|
||||
|
||||
Reference in New Issue
Block a user