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

Sets Deletable to false in DeleteRestrictions annotations for navigation property of type acessPackageAssignment #683

Closed
wants to merge 10 commits into from
12 changes: 11 additions & 1 deletion transforms/csdl/preprocess_csdl.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -1871,7 +1871,17 @@
</xsl:element>
</xsl:when>
</xsl:choose>

<!-- Remove Deletability for entitlementManagement/accessPackageAssignments navigation property-->
<xsl:choose>
<xsl:when test="not(edm:Annotations[@Target='microsoft.graph.entitlementManagement.acessPackageAssignment'])">
<xsl:element name="Annotations">
<xsl:attribute name="Target">microsoft.graph.entitlementManagement.acessPackageAssignment</xsl:attribute>
<xsl:call-template name="DeleteRestrictionsTemplate">
<xsl:with-param name="deletable">false</xsl:with-param>
</xsl:call-template>
</xsl:element>
</xsl:when>
</xsl:choose>
</xsl:copy>
</xsl:template>

Expand Down
7 changes: 7 additions & 0 deletions transforms/csdl/preprocess_csdl_test_input.xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,13 @@
</Record>
</Annotation>
</Annotations>
<Annotations Target="microsoft.graph.entitlementManagement.acessPackageAssignment">
<Annotation Term="Org.OData.Capabilities.V1.DeleteRestrictions">
<Record>
<PropertyValue Property="Deletable" Bool="false" />
</Record>
</Annotation>
</Annotations>
<Annotations Target="microsoft.graph.team/photo">
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
<Record>
Expand Down
19 changes: 10 additions & 9 deletions transforms/csdl/preprocess_csdl_test_output.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='preprocess_csdl.xsl'?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
<edmx:DataServices>
Expand Down Expand Up @@ -562,11 +562,11 @@
</Collection>
</Annotation>
</Property>
</EntityType>
<EntityType Name="workbookFunctionResult" BaseType="graph.entity">
<Property Name="error" Type="Edm.String" />
<Property Name="value" Type="Edm.Untyped" />
</EntityType>
</EntityType>
<EntityType Name="workbookFunctionResult" BaseType="graph.entity">
<Property Name="error" Type="Edm.String" />
<Property Name="value" Type="graph.Json" />
</EntityType>
<EntityType Name="authenticationEventsFlow" BaseType="graph.entity" Abstract="true" OpenType="true">
<Property Name="conditions" Type="graph.authenticationConditions">
<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." />
Expand Down Expand Up @@ -745,6 +745,7 @@
</Record>
</Annotation>
</Annotations>
<Annotations Target="microsoft.graph.entitlementManagement.acessPackageAssignment" />
<Annotations Target="microsoft.graph.team/photo">
<Annotation Term="Org.OData.Capabilities.V1.InsertRestrictions">
<Record>
Expand Down Expand Up @@ -1190,9 +1191,9 @@
</Function>
<Action Name="days360" IsBound="true">
<Parameter Name="bindparameter" Type="graph.workbookFunctions" />
<Parameter Name="startDate" Type="Edm.Untyped" />
<Parameter Name="endDate" Type="Edm.Untyped" />
<Parameter Name="method" Type="Edm.Untyped" />
<Parameter Name="startDate" Type="graph.Json" />
<Parameter Name="endDate" Type="graph.Json" />
<Parameter Name="method" Type="graph.Json" />
<ReturnType Type="graph.workbookFunctionResult" />
</Action>
<Action Name="add" IsBound="true">
Expand Down
Loading