Skip to content

Commit

Permalink
resolve conflicts and cater for edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
andrueastman committed Oct 14, 2024
1 parent 56e2602 commit 10ab5ac
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
12 changes: 12 additions & 0 deletions transforms/csdl/preprocess_csdl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,18 @@
</xsl:call-template>
</xsl:copy>
</xsl:template>
<!-- Add paths for user authentication requirements by adding annotations to read and update the complex property-->
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='authentication']/edm:Property[@Name='requirements']">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
<xsl:call-template name="ReadRestrictionsTemplate">
<xsl:with-param name="readable">true</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="UpdateRestrictionsTemplate">
<xsl:with-param name="updatable">true</xsl:with-param>
</xsl:call-template>
</xsl:copy>
</xsl:template>
<!-- Add paths for user serviceProvisioningErrors by adding annotations to read complex property-->
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='user']/edm:Property[@Name='serviceProvisioningErrors']|
edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='group']/edm:Property[@Name='serviceProvisioningErrors']|
Expand Down
5 changes: 5 additions & 0 deletions transforms/csdl/preprocess_csdl_test_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@
<Annotation Term="Org.OData.Core.V1.Description" String="The conditions representing the context of the authentication request that will be used to decide whether the events policy will be invoked." />
</Property>
</EntityType>
<EntityType Name="authentication" BaseType="graph.entity" Abstract="true" OpenType="true">
<Property Name="requirements" Type="graph.strongAuthenticationRequirements">
<Annotation Term="Org.OData.Core.V1.Description" String="The settings and preferences for per-user Microsoft Entra multifactor authentication." />
</Property>
</EntityType>
<ComplexType Name="onAttributeCollectionExternalUsersSelfServiceSignUp" BaseType="graph.onAttributeCollectionHandler">
<NavigationProperty Name="attributes" Type="Collection(graph.identityUserFlowAttribute)" />
</ComplexType>
Expand Down
15 changes: 15 additions & 0 deletions transforms/csdl/preprocess_csdl_test_output.xml
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,21 @@
<Annotation Term="Org.OData.Core.V1.Description" String="The conditions representing the context of the authentication request that will be used to decide whether the events policy will be invoked." />
</Property>
</EntityType>
<EntityType Name="authentication" BaseType="graph.entity" Abstract="true" OpenType="true">
<Property Name="requirements" Type="graph.strongAuthenticationRequirements">
<Annotation Term="Org.OData.Core.V1.Description" String="The settings and preferences for per-user Microsoft Entra multifactor authentication." />
<Annotation Term="Org.OData.Capabilities.V1.ReadRestrictions">
<Record>
<PropertyValue Property="Readable" Bool="true" />
</Record>
</Annotation>
<Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">
<Record>
<PropertyValue Property="Updatable" Bool="true" />
</Record>
</Annotation>
</Property>
</EntityType>
<ComplexType Name="onAttributeCollectionExternalUsersSelfServiceSignUp" BaseType="graph.onAttributeCollectionHandler">
<NavigationProperty Name="attributes" Type="Collection(graph.identityUserFlowAttribute)">
<Annotation Term="Org.OData.Capabilities.V1.NavigationRestrictions">
Expand Down

0 comments on commit 10ab5ac

Please sign in to comment.