Skip to content

Commit 789372e

Browse files
committed
Only allow content drag when the agent has acl:Write access
1 parent f93578a commit 789372e

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client

src/main/webapp/static/com/atomgraph/linkeddatahub/xsl/bootstrap/2.3.2/client/content.xsl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ exclude-result-prefixes="#all"
956956

957957
<!-- start dragging content (or its descendants) -->
958958

959-
<xsl:template match="div[ac:mode() = '&ldh;ContentMode'][contains-token(@class, 'content')][contains-token(@class, 'row-fluid')]/descendant-or-self::*" mode="ixsl:ondragstart">
959+
<xsl:template match="div[ac:mode() = '&ldh;ContentMode'][acl:mode() = '&acl;Write'][contains-token(@class, 'content')][contains-token(@class, 'row-fluid')]/descendant-or-self::*" mode="ixsl:ondragstart">
960960
<xsl:choose>
961961
<!-- allow drag on the content <div> -->
962962
<xsl:when test="self::div[contains-token(@class, 'content')][contains-token(@class, 'row-fluid')]">
@@ -973,18 +973,18 @@ exclude-result-prefixes="#all"
973973

974974
<!-- dragging content over other content -->
975975

976-
<xsl:template match="div[ac:mode() = '&ldh;ContentMode'][contains-token(@class, 'content')][contains-token(@class, 'row-fluid')][acl:mode() = '&acl;Write']" mode="ixsl:ondragover">
976+
<xsl:template match="div[ac:mode() = '&ldh;ContentMode'][acl:mode() = '&acl;Write'][contains-token(@class, 'content')][contains-token(@class, 'row-fluid')][acl:mode() = '&acl;Write']" mode="ixsl:ondragover">
977977
<xsl:sequence select="ixsl:call(ixsl:event(), 'preventDefault', [])"/>
978978
<ixsl:set-property name="dataTransfer.dropEffect" select="'move'" object="ixsl:event()"/>
979979
</xsl:template>
980980

981981
<!-- change the style of elements when content is dragged over them -->
982982

983-
<xsl:template match="div[ac:mode() = '&ldh;ContentMode'][contains-token(@class, 'content')][contains-token(@class, 'row-fluid')][acl:mode() = '&acl;Write']" mode="ixsl:ondragenter">
983+
<xsl:template match="div[ac:mode() = '&ldh;ContentMode'][acl:mode() = '&acl;Write'][contains-token(@class, 'content')][contains-token(@class, 'row-fluid')][acl:mode() = '&acl;Write']" mode="ixsl:ondragenter">
984984
<xsl:sequence select="ixsl:call(ixsl:get(., 'classList'), 'toggle', [ 'drag-over', true() ])[current-date() lt xs:date('2000-01-01')]"/>
985985
</xsl:template>
986986

987-
<xsl:template match="div[ac:mode() = '&ldh;ContentMode'][contains-token(@class, 'content')][contains-token(@class, 'row-fluid')][acl:mode() = '&acl;Write']" mode="ixsl:ondragleave">
987+
<xsl:template match="div[ac:mode() = '&ldh;ContentMode'][acl:mode() = '&acl;Write'][contains-token(@class, 'content')][contains-token(@class, 'row-fluid')][acl:mode() = '&acl;Write']" mode="ixsl:ondragleave">
988988
<xsl:variable name="related-target" select="ixsl:get(ixsl:event(), 'relatedTarget')" as="element()?"/> <!-- the element drag entered (optional) -->
989989

990990
<!-- only remove class if the related target does not have this div as ancestor (is not its child) -->
@@ -995,7 +995,7 @@ exclude-result-prefixes="#all"
995995

996996
<!-- dropping content over other content -->
997997

998-
<xsl:template match="div[ac:mode() = '&ldh;ContentMode'][contains-token(@class, 'content')][contains-token(@class, 'row-fluid')][acl:mode() = '&acl;Write']" mode="ixsl:ondrop">
998+
<xsl:template match="div[ac:mode() = '&ldh;ContentMode'][acl:mode() = '&acl;Write'][contains-token(@class, 'content')][contains-token(@class, 'row-fluid')][acl:mode() = '&acl;Write']" mode="ixsl:ondrop">
999999
<xsl:sequence select="ixsl:call(ixsl:event(), 'preventDefault', [])"/>
10001000
<xsl:variable name="container" select="." as="element()"/>
10011001
<xsl:variable name="content-uri" select="@about" as="xs:anyURI"/>

0 commit comments

Comments
 (0)