This commit is contained in:
@@ -566,7 +566,7 @@ namespace AyaNova.Api.Controllers
|
||||
{
|
||||
//check if allowed
|
||||
var woTags = await ct.WorkOrder.AsNoTracking().Where(x => x.Id == dbObject.AttachToObjectId).Select(x => x.Tags).FirstOrDefaultAsync();
|
||||
var custUserRights = await UserBiz.CustomerUserEffectiveRightsAsync(UserIdFromContext.Id(HttpContext.Items), woTags);
|
||||
var custUserRights = await UserBiz.CustomerUserEffectiveRightsAsync(DownloadUser.Id, woTags);
|
||||
if (!custUserRights.ThisWOCanAttachments)
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user