refactoring in preparation for release

This commit is contained in:
Shaun Walker 2021-05-28 07:53:49 -04:00
parent 4108c07862
commit e0c2763c9f
10 changed files with 6 additions and 10 deletions

View File

@ -27,6 +27,6 @@
</ItemGroup>
<Target Name="CopyPackage" AfterTargets="Pack">
<Copy SourceFiles="$(OutputPath)..\$(PackageName)" DestinationFiles="..\Oqtane.Server\Packages\$(PackageName).bak" />
<Copy SourceFiles="$(OutputPath)..\$(PackageName)" DestinationFiles="..\Oqtane.Server\wwwroot\Packages\$(PackageName).bak" />
</Target>
</Project>

View File

@ -29,6 +29,6 @@
</ItemGroup>
<Target Name="CopyPackage" AfterTargets="Pack">
<Copy SourceFiles="$(OutputPath)..\$(PackageName)" DestinationFiles="..\Oqtane.Server\Packages\$(PackageName).bak" />
<Copy SourceFiles="$(OutputPath)..\$(PackageName)" DestinationFiles="..\Oqtane.Server\wwwroot\Packages\$(PackageName).bak" />
</Target>
</Project>

View File

@ -27,7 +27,7 @@
</ItemGroup>
<Target Name="CopyPackage" AfterTargets="Pack">
<Copy SourceFiles="$(OutputPath)..\$(PackageName)" DestinationFiles="..\Oqtane.Server\Packages\$(PackageName).bak" />
<Copy SourceFiles="$(OutputPath)..\$(PackageName)" DestinationFiles="..\Oqtane.Server\wwwroot\Packages\$(PackageName).bak" />
</Target>
</Project>

View File

@ -27,7 +27,7 @@
</ItemGroup>
<Target Name="CopyPackage" AfterTargets="Pack">
<Copy SourceFiles="$(OutputPath)..\$(PackageName)" DestinationFiles="..\Oqtane.Server\Packages\$(PackageName).bak" />
<Copy SourceFiles="$(OutputPath)..\$(PackageName)" DestinationFiles="..\Oqtane.Server\wwwroot\Packages\$(PackageName).bak" />
</Target>
</Project>

View File

@ -44,8 +44,8 @@ namespace Oqtane.Infrastructure
Directory.CreateDirectory(sourceFolder);
}
// support for legacy folder locations
foreach (var folder in "Modules,Themes".Split(","))
// move packages to secure location
foreach (var folder in "Modules,Themes,Packages".Split(","))
{
foreach(var file in Directory.GetFiles(Path.Combine(webRootPath, folder), "*.nupkg"))
{

View File

@ -31,10 +31,6 @@ namespace Oqtane.Security
{
entityId = int.Parse(ctx.Request.Query["auth" + requirement.EntityName.ToLower() + "id"]);
}
if (entityId == -1 && ctx.Request.Query.ContainsKey("entityid"))
{
entityId = int.Parse(ctx.Request.Query["entityid"]);
}
if (_userPermissions.IsAuthorized(context.User, requirement.EntityName, entityId, requirement.PermissionName))
{
context.Succeed(requirement);