Skip to content
Closed
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
10 changes: 10 additions & 0 deletions transforms/csdl/preprocess_csdl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,15 @@
</xsl:call-template>
</xsl:copy>
</xsl:template>
<!-- Add paths for user authentication requirements by adding annotations to update properties of the sitePage object-->
<xsl:template match="edm:Schema[@Namespace='microsoft.graph']/edm:EntityType[@Name='sitePage']">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
<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 Expand Up @@ -2193,6 +2202,7 @@
</xsl:element>
</xsl:copy>
</xsl:template>


<!-- If only the grand-parent "Annotations" tag exists, modify it -->
<!-- Add UpdateRestrictions for crossTenantAccessPolicyConfigurationPartner/identitySynchronization navigation property -->
Expand Down
16 changes: 16 additions & 0 deletions transforms/csdl/preprocess_csdl_test_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@
<Property Name="pageLayout" Type="graph.pageLayoutType" />
<Property Name="publishingState" Type="graph.publicationFacet" />
<Property Name="title" Type="Edm.String" />
</EntityType>
<EntityType Name="sitePage" BaseType="graph.baseSitePage" OpenType="true">
<Property Name="promotionKind" Type="graph.pagePromotionType"/>
<Property Name="reactions" Type="graph.reactionsFacet"/>
<Property Name="showComments" Type="Edm.Boolean"/>
<Property Name="showRecommendedPages" Type="Edm.Boolean"/>
<Property Name="thumbnailWebUrl" Type="Edm.String"/>
<Property Name="titleArea" Type="graph.titleArea"/>
</EntityType>
<EntityType Name="driveItem" BaseType="graph.baseItem">
<Property Name="content" Type="Edm.Stream" />
Expand Down Expand Up @@ -261,6 +269,14 @@
</Record>
</Annotation>
</Annotations>
<Annotations Target="microsoft.graph.sitePage">
<Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">
<Record>
<PropertyValue Property="Description" String="Update properties of the sitePage object." />
<PropertyValue Property="LongDescription" String="Update properties of the sitePage object." />
</Record>
</Annotation>
</Annotations>
<Annotations Target="microsoft.graph.driveItem/children">
<Annotation Term="Org.OData.Capabilities.V1.ReadRestrictions">
<Record>
Expand Down
18 changes: 18 additions & 0 deletions transforms/csdl/preprocess_csdl_test_output.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,10 @@
<EntityType Name="synchronizationJob" BaseType="graph.entity">
<NavigationProperty Name="schema" Type="graph.synchronizationSchema" ContainsTarget="true" />
</EntityType>
<EntityType Name="schema" BaseType="graph.entity">
<Property Name="baseType" Type="Edm.String" Nullable="false" />
<Property Name="properties" Type="Collection(graph.property)" />
</EntityType>
<EntityType Name="synchronizationSchema" BaseType="graph.entity">
<Property Name="synchronizationRules" Type="Collection(graph.synchronizationRule)" />
<Property Name="version" Type="Edm.String" />
Expand Down Expand Up @@ -353,6 +357,19 @@
<Property Name="publishingState" Type="graph.publicationFacet" />
<Property Name="title" Type="Edm.String" />
</EntityType>
<EntityType Name="sitePage" BaseType="graph.baseSitePage" OpenType="true">
<Property Name="promotionKind" Type="graph.pagePromotionType" />
<Property Name="reactions" Type="graph.reactionsFacet" />
<Property Name="showComments" Type="Edm.Boolean" />
<Property Name="showRecommendedPages" Type="Edm.Boolean" />
<Property Name="thumbnailWebUrl" Type="Edm.String" />
<Property Name="titleArea" Type="graph.titleArea" />
<Annotation Term="Org.OData.Capabilities.V1.UpdateRestrictions">
<Record>
<PropertyValue Property="Updatable" Bool="true" />
</Record>
</Annotation>
</EntityType>
<EntityType Name="driveItem" BaseType="graph.baseItem">
<Property Name="content" Type="Edm.Stream">
<Annotation Term="Org.OData.Capabilities.V1.ReadRestrictions">
Expand Down Expand Up @@ -767,6 +784,7 @@
</Record>
</Annotation>
</Annotations>
<Annotations Target="microsoft.graph.sitePage" />
<Annotations Target="microsoft.graph.driveItem/children">
<Annotation Term="Org.OData.Capabilities.V1.ReadRestrictions">
<Record>
Expand Down
Loading