Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dps profiles #1

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

env:
INFORMATIONAL_VERSION: "6.1"
BUILD_INCREMENTER: "1"
BUILD_INCREMENTER: "-1050"
CONFIGURATION: "Release"
VERSION_MAJOR: "6"
VERSION_MINOR: "1"
Expand Down Expand Up @@ -140,4 +140,4 @@ jobs:
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
with:
name: NugetPackages.Artifacts
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/*.nupkg
path: ${{ github.workspace }}/Ed-Fi-ODS-Implementation/NugetPackages/*.nupkg
7 changes: 7 additions & 0 deletions Application/Ed-Fi-Ods.sln
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EdFi.Ods.Api.IntegrationTes
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EdFi.Ods.Features.UnitTests", "..\..\Ed-Fi-ODS\tests\EdFi.Ods.Features.UnitTests\EdFi.Ods.Features.UnitTests.csproj", "{CBEDAB3E-3182-41D6-9C87-D2B4B426FBC7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EdFi.Ods.Profiles.Dps", "EdFi.Ods.Profiles.Dps\EdFi.Ods.Profiles.Dps.csproj", "{5A352475-2846-49EB-9F52-B64218203925}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -203,6 +205,10 @@ Global
{CBEDAB3E-3182-41D6-9C87-D2B4B426FBC7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CBEDAB3E-3182-41D6-9C87-D2B4B426FBC7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CBEDAB3E-3182-41D6-9C87-D2B4B426FBC7}.Release|Any CPU.Build.0 = Release|Any CPU
{5A352475-2846-49EB-9F52-B64218203925}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5A352475-2846-49EB-9F52-B64218203925}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5A352475-2846-49EB-9F52-B64218203925}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5A352475-2846-49EB-9F52-B64218203925}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -236,6 +242,7 @@ Global
{538782E7-25DC-494D-902D-3EE2EC839DC6} = {26FBA24F-2F1E-47EA-BDE2-EF57AE81D65D}
{3ED34C57-BFEF-4FA1-9497-28D7D611D1B9} = {3AD03A98-4A2C-42F1-997D-2468A0CCB77D}
{CBEDAB3E-3182-41D6-9C87-D2B4B426FBC7} = {14352B5E-2434-4117-A063-2BBD4D87464D}
{5A352475-2846-49EB-9F52-B64218203925} = {6B596494-5C35-4A04-93A8-13B21EBF9910}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {91F27EA2-CFF0-4054-A019-B8AA23AF9319}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<None Update="AdminCredential.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="..\..\Plugin\**" LinkBase="Plugin\" Exclude="..\..\Plugin\*.ps1;..\..\Plugin\**\*.nupkg" CopyToPublishDirectory="Always" CopyToOutputDirectory="Never" />
<Content Include="..\..\Plugin\**" LinkBase="Plugin\" Exclude="..\..\Plugin\*Profiles.Sample*\**;..\..\Plugin\*.ps1;..\..\Plugin\**\*.nupkg" CopyToPublishDirectory="Always" CopyToOutputDirectory="Always" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
using EdFi.Ods.Common.Infrastructure.Filtering;
using EdFi.Security.DataAccess.Repositories;
using NHibernate;
using EdFi.Ods.Common.Context;

namespace EdFi.Ods.Features.OwnershipBasedAuthorization.Security
{
Expand All @@ -41,7 +42,7 @@ public class OwnershipInitializationCreateEntityDecorator<T>
/// <param name="sessionFactory"></param>
/// <param name="apiKeyContextProvider"></param>
/// <param name="viewBasedSingleItemAuthorizationQuerySupport"></param>
/// <param name="dataManagementRequestContextProvider"></param>
/// <param name="dataManagementResourceContextProvider"></param>
public OwnershipInitializationCreateEntityDecorator(
ICreateEntity<T> next,
IAuthorizationContextProvider authorizationContextProvider,
Expand All @@ -53,7 +54,7 @@ public OwnershipInitializationCreateEntityDecorator(
ISessionFactory sessionFactory,
IApiKeyContextProvider apiKeyContextProvider,
IViewBasedSingleItemAuthorizationQuerySupport viewBasedSingleItemAuthorizationQuerySupport,
IDataManagementRequestContextProvider dataManagementRequestContextProvider)
IContextProvider<DataManagementResourceContext> dataManagementResourceContextProvider)
: base(
authorizationContextProvider,
authorizationFilteringProvider,
Expand All @@ -64,7 +65,7 @@ public OwnershipInitializationCreateEntityDecorator(
sessionFactory,
apiKeyContextProvider,
viewBasedSingleItemAuthorizationQuerySupport,
dataManagementRequestContextProvider)
dataManagementResourceContextProvider)
{
_next = Preconditions.ThrowIfNull(next, nameof(next));
_apiKeyContextProvider = Preconditions.ThrowIfNull(apiKeyContextProvider, nameof(apiKeyContextProvider));
Expand Down
34 changes: 34 additions & 0 deletions Application/EdFi.Ods.Profiles.Dps/EdFi.Ods.Profiles.Dps.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>EdFi.Ods.Profiles.Dps</AssemblyName>
<RootNamespace>EdFi.Ods.Profiles.Dps</RootNamespace>
<RestorePackages>true</RestorePackages>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="FluentValidation" Version="10.4.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<ItemGroup>
<Content Include="Marker_EdFi_Ods_Profiles_Dps.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
</Content>
<Content Include="assemblyMetadata.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Profiles.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Ed-Fi-ODS\Application\EdFi.Ods.Standard\EdFi.Ods.Standard.csproj" />
<ProjectReference Include="..\..\..\Ed-Fi-ODS\Application\EdFi.Ods.Api\EdFi.Ods.Api.csproj" />
<ProjectReference Include="..\..\..\Ed-Fi-ODS\Application\EdFi.Ods.Common\EdFi.Ods.Common.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
namespace EdFi.Ods.Profiles.Dps
{
// TODO: Rename this interface to match the marker interface convention
public interface Marker_EdFi_Ods_Profiles_Dps { }
}
42 changes: 42 additions & 0 deletions Application/EdFi.Ods.Profiles.Dps/Profiles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>

<Profiles>
<Profile name="Section-no-OfficialAttendance">
<Resource name="Section">
<ReadContentType memberSelection="ExcludeOnly" >
<Property name="OfficialAttendancePeriod" />
</ReadContentType>
<WriteContentType memberSelection="ExcludeOnly" >
<Property name="OfficialAttendancePeriod" />
</WriteContentType>
</Resource>
</Profile>

<Profile name="ClassPeriod-no-OfficialAttendance">
<Resource name="ClassPeriod">
<ReadContentType memberSelection="ExcludeOnly" >
<Property name="OfficialAttendancePeriod" />
</ReadContentType>
<WriteContentType memberSelection="ExcludeOnly" >
<Property name="OfficialAttendancePeriod" />
</WriteContentType>
</Resource>
</Profile>

<Profile name="Section-OfficalAttendanceOnly">
<Resource name="Section">
<WriteContentType memberSelection="IncludeAll">
<Property name="OfficialAttendancePeriod" />
</WriteContentType>
</Resource>
</Profile>

<Profile name="ClassPeriod-OfficalAttendanceOnly">
<Resource name="ClassPeriod">
<WriteContentType memberSelection="IncludeAll">
<Property name="OfficialAttendancePeriod" />
</WriteContentType>
</Resource>
</Profile>

</Profiles>
4 changes: 4 additions & 0 deletions Application/EdFi.Ods.Profiles.Dps/assemblyMetadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"assemblyModelType": "profile",
"assemblyMetadataFormatVersion": "1.0.0"
}
1 change: 1 addition & 0 deletions Application/EdFi.Ods.WebApi/EdFi.Ods.WebApi.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<ProjectReference Include="..\..\..\Ed-Fi-ODS\Application\EdFi.Ods.Features\EdFi.Ods.Features.csproj" />
<ProjectReference Include="..\..\..\Ed-Fi-ODS\Application\EdFi.Ods.Standard\EdFi.Ods.Standard.csproj" />
<ProjectReference Include="..\..\..\Ed-Fi-ODS-Implementation\Application\EdFi.Ods.Features.OwnershipBasedAuthorization\EdFi.Ods.Features.OwnershipBasedAuthorization.csproj" />
<ProjectReference Include="..\EdFi.Ods.Profiles.Dps\EdFi.Ods.Profiles.Dps.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 7 additions & 1 deletion logistics/scripts/modules/settings/settings-management.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,12 @@ function Add-TestSpecificAppSettings([hashtable] $Settings = @{ }, [string] $Pro

$newSettings = @{
ConnectionStrings = @{ }
ApiSettings = @{
Mode = "SharedInstance"
}
Plugin = @{
Folder = "Plugin"
}
}

$csbs = Get-ConnectionStringBuildersFromSettings $Settings
Expand Down Expand Up @@ -593,11 +599,11 @@ function New-DevelopmentAppSettings([hashtable] $Settings = @{ }) {
$newDevelopmentSettings = Merge-Hashtables $developmentSettingsByProject[$project], $newDevelopmentSettings

$newDevelopmentSettings = Add-TestSpecificAppSettings $newDevelopmentSettings $project
$newDevelopmentSettings = Add-TestHarnessSpecificAppSettings $newDevelopmentSettings $project

$newDevelopmentSettings = Merge-Hashtables $newDevelopmentSettings, $credentialSettingsByProject[$project], $Settings

$newDevelopmentSettings = Remove-WebApiSpecificSettings $newDevelopmentSettings $project
$newDevelopmentSettings = Add-TestHarnessSpecificAppSettings $newDevelopmentSettings $project

$projectPath = Get-RepositoryResolvedPath $Project

Expand Down