Skip to content

Commit

Permalink
Sets deletable to false
Browse files Browse the repository at this point in the history
  • Loading branch information
Microsoft Graph DevX Tooling authored and Microsoft Graph DevX Tooling committed Sep 9, 2024
1 parent e800e91 commit 2272e99
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
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 identityGovernance/entitlementManagement/accessPackageAssignments navigation property-->
<xsl:choose>
<xsl:when test="not(edm:Annotations[@Target='microsoft.graph.identityGovernance.entitlementManagement.acessPackageAssignment'])">
<xsl:element name="Annotations">
<xsl:attribute name="Target">microsoft.graph.identityGovernance.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.identityGovernance.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.identityGovernance.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

0 comments on commit 2272e99

Please sign in to comment.