<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to work permissionProperty in InlineEditProperty Widget in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311455#M264585</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK... so the currentItem object for each widget in your instance will have access to the following properties:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;url&lt;/LI&gt;&lt;LI&gt;sitePreset&lt;/LI&gt;&lt;LI&gt;shortName&lt;/LI&gt;&lt;LI&gt;title&lt;/LI&gt;&lt;LI&gt;description&lt;/LI&gt;&lt;LI&gt;isPublic&lt;/LI&gt;&lt;LI&gt;node&lt;/LI&gt;&lt;LI&gt;tagScope&lt;/LI&gt;&lt;LI&gt;siteRole&lt;/LI&gt;&lt;LI&gt;isPublic&lt;/LI&gt;&lt;LI&gt;visibility&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attribute that is closest to what you want is going to be siteRole - but it is &lt;STRONG&gt;not&lt;/STRONG&gt; a boolean value and looking at the InlineEditProperty widget source it is using a "truthy" evaluation so any value will be treated as true. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have your own service you can add a new attribute to each item to indicate whether or not the user has permission to make a change. I'm assuming that you want to allow the user to edit the site title - only a SiteManager has permission to do this, therefore you could add a new attribute "isSiteManager" which evaluates to "siteRole === "SiteManager".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use this new "isSiteManager" attribute as the "permissionProperty"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Oct 2016 14:49:50 GMT</pubDate>
    <dc:creator>ddraper</dc:creator>
    <dc:date>2016-10-07T14:49:50Z</dc:date>
    <item>
      <title>How to work permissionProperty in InlineEditProperty Widget</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311448#M264578</link>
      <description>Hi,i have used following widget. but i have no idea how to fill "node.permissions.user.Write". currently&amp;nbsp; i used my own json file to read site data please give me hint how to do that?{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id: "MY_PROJECT_ID",&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</description>
      <pubDate>Fri, 07 Oct 2016 11:51:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311448#M264578</guid>
      <dc:creator>janaka1984</dc:creator>
      <dc:date>2016-10-07T11:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to work permissionProperty in InlineEditProperty Widget</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311449#M264579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The permissionProperty is an optional configuration attribute. If provided the InlineEditProperty widget will attempt to look up the specified property in the currentItem object assigned to it. The the property cannot be found or is false then the current user will not be given access to toggle edit mode. The "node.permissions.user.Write" is an attribute that you would expect to find in the XHR response from a Document Library REST API. It indicates if the user has write permission on that node. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The permissionProperty can be any value, but obviously it makes sense to have a relevant value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is an example of this in the unit test application - see the controller &lt;A href="https://github.com/Alfresco/Aikau/blob/4b3714b846fc34ac21ab4c661de7fce8c621d276/aikau/src/test/resources/testApp/WEB-INF/classes/alfresco/site-webscripts/alfresco/renderers/InlineEditProperty.get.js" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 12:39:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311449#M264579</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2016-10-07T12:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to work permissionProperty in InlineEditProperty Widget</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311450#M264580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;although i use permissionProperty: "node.permissions.user.Write" with widget,&amp;nbsp; i can not see it in "this.currentItem". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;do i need to explicitly defined&amp;nbsp; "node.permissions.user.Write" attribute in any where like unit test application?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 13:31:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311450#M264580</guid>
      <dc:creator>janaka1984</dc:creator>
      <dc:date>2016-10-07T13:31:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to work permissionProperty in InlineEditProperty Widget</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311451#M264581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The &lt;SPAN style="font-family: 'courier new', courier;"&gt;currentItem&lt;/SPAN&gt; object represent the current context item. The reason it exists is so that when using a widget that iterates over it's widgets model with an array of data (the classing example being the &lt;A href="https://dev.alfresco.com/resource/docs/aikau-jsdoc/AlfListView.html" rel="nofollow noopener noreferrer"&gt;alfresco/lists/views/AlfListView&lt;/A&gt; widget) each instance has a different &lt;SPAN style="font-family: 'courier new', courier;"&gt;currentItem&lt;/SPAN&gt;. So the standard list pattern is that an &lt;A href="https://dev.alfresco.com/resource/docs/aikau-jsdoc/AlfList.html" rel="nofollow noopener noreferrer"&gt;alfresco/lists/AlfList&lt;/A&gt; widget will load an array of data (typically Nodes from the repository) and then pass those to an AlfListView to be rendered. The widgets model in the view is re-rendered for each node in the array, and each model instance will have a &lt;SPAN style="font-family: 'courier new', courier;"&gt;currentItem&lt;/SPAN&gt; containing the data for the node that it represents.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when the &lt;A href="https://dev.alfresco.com/resource/docs/aikau-jsdoc/AlfDocumentList.html" rel="nofollow noopener noreferrer"&gt;alfresco/documentlibrary/AlfDocumentList&lt;/A&gt; (which extends AlfList) requests data from the &lt;A href="https://dev.alfresco.com/resource/docs/aikau-jsdoc/DocumentService.html" rel="nofollow noopener noreferrer"&gt;DocumentService&lt;/A&gt; a Document Library REST API will be called that will retrieve an array of nodes (documents) to display. Each node will have permissions metadata and if you had an &lt;A href="https://dev.alfresco.com/resource/docs/aikau-jsdoc/InlineEditProperty.html" rel="nofollow noopener noreferrer"&gt;InlineEditProperty&lt;/A&gt; widget in the view then only the nodes that the current user have write permission to would be editable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ultimately you &lt;STRONG&gt;can&lt;/STRONG&gt; configure a &lt;SPAN style="font-family: 'courier new', courier;"&gt;currentItem&lt;/SPAN&gt; yourself - but if you know that the user shouldn't be editing the property, then you shouldn't be using the InlineEditProperty widget. It makes more sense when used within the context of a view.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of this is described in detail in the &lt;A href="https://github.com/Alfresco/Aikau/blob/develop/tutorial/chapters/Contents.md" rel="nofollow noopener noreferrer"&gt;Aikau tutorial&lt;/A&gt; - and &lt;A href="https://github.com/Alfresco/Aikau/blob/develop/tutorial/chapters/Tutorial10.md" rel="nofollow noopener noreferrer"&gt;this chapter&lt;/A&gt; in particular.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 13:43:23 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311451#M264581</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2016-10-07T13:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to work permissionProperty in InlineEditProperty Widget</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311452#M264582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In my case , i use "alfresco/documentlibrary/AlfSitesList", becuase i need to render existing sites and allow &lt;STRONG&gt;admin&lt;/STRONG&gt; to edit site details and not allow to&lt;STRONG&gt; normal user&lt;/STRONG&gt; to edit .&amp;nbsp;&amp;nbsp;&amp;nbsp; i couldn't see&amp;nbsp; "node.permissions.user.Write" attribute on this.currentItem yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To configure &lt;STRONG&gt;currentItem, &lt;/STRONG&gt;do i need to change &lt;STRONG&gt;mytest.get.json.js&lt;/STRONG&gt; file as i pasted at top ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 14:28:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311452#M264582</guid>
      <dc:creator>janaka1984</dc:creator>
      <dc:date>2016-10-07T14:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to work permissionProperty in InlineEditProperty Widget</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311453#M264583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You &lt;STRONG&gt;can&lt;/STRONG&gt; configure a currentItem for any widget, however if you're using a list (like the AlfSitesList) then the currentItem will be overridden for each item in the list. The reason that you're not seeing that property is because it almost certainly isn't in the response body of the REST API that you're calling. What URL are you calling to get the data to populate the AlfSitesList?&amp;nbsp; And what does the data look like for each item in the array of sites?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 14:36:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311453#M264583</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2016-10-07T14:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to work permissionProperty in InlineEditProperty Widget</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311454#M264584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i used my own service&amp;nbsp; - url: AlfConstants.PROXY_URI +"xyz/my-project-repo?skipCount=" + skipCount + "&amp;amp;maxItems="+ payload.pageSize,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;return following result when call above array&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;"list" : {&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"pagination" : {&lt;/P&gt;&lt;P&gt;"count" : "9",&lt;/P&gt;&lt;P&gt;"hasMoreItems" : "false",&lt;/P&gt;&lt;P&gt;"totalItems" : "9",&lt;/P&gt;&lt;P&gt;"skipCount" :"0",&lt;/P&gt;&lt;P&gt;"maxItems" : "25"&lt;/P&gt;&lt;P&gt;},&lt;/P&gt;&lt;P&gt;"entries" :[&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;"entry" :{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"url": "/alfresco/s/api/sites/a1",&lt;/P&gt;&lt;P&gt;"sitePreset": "site-dashboard",&lt;/P&gt;&lt;P&gt;"shortName": "a1",&lt;/P&gt;&lt;P&gt;"title": "A10",&lt;/P&gt;&lt;P&gt;"description": "",&lt;/P&gt;&lt;P&gt;"isPublic": true,&lt;/P&gt;&lt;P&gt;"node": "/alfresco/s/api/node/workspace/SpacesStore/84bb5e8b-7a24-4d05-bfbc-c232b784b88d",&lt;/P&gt;&lt;P&gt;"tagScope": "/alfresco/s/api/tagscopes/workspace/SpacesStore/84bb5e8b-7a24-4d05-bfbc-c232b784b88d",&lt;/P&gt;&lt;P&gt;"siteRole": "SiteManager"&lt;/P&gt;&lt;P&gt;"isPublic": true,&lt;/P&gt;&lt;P&gt;"visibility": "PUBLIC"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 14:42:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311454#M264584</guid>
      <dc:creator>janaka1984</dc:creator>
      <dc:date>2016-10-07T14:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to work permissionProperty in InlineEditProperty Widget</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311455#M264585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK... so the currentItem object for each widget in your instance will have access to the following properties:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;url&lt;/LI&gt;&lt;LI&gt;sitePreset&lt;/LI&gt;&lt;LI&gt;shortName&lt;/LI&gt;&lt;LI&gt;title&lt;/LI&gt;&lt;LI&gt;description&lt;/LI&gt;&lt;LI&gt;isPublic&lt;/LI&gt;&lt;LI&gt;node&lt;/LI&gt;&lt;LI&gt;tagScope&lt;/LI&gt;&lt;LI&gt;siteRole&lt;/LI&gt;&lt;LI&gt;isPublic&lt;/LI&gt;&lt;LI&gt;visibility&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attribute that is closest to what you want is going to be siteRole - but it is &lt;STRONG&gt;not&lt;/STRONG&gt; a boolean value and looking at the InlineEditProperty widget source it is using a "truthy" evaluation so any value will be treated as true. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have your own service you can add a new attribute to each item to indicate whether or not the user has permission to make a change. I'm assuming that you want to allow the user to edit the site title - only a SiteManager has permission to do this, therefore you could add a new attribute "isSiteManager" which evaluates to "siteRole === "SiteManager".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could use this new "isSiteManager" attribute as the "permissionProperty"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Oct 2016 14:49:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-work-permissionproperty-in-inlineeditproperty-widget/m-p/311455#M264585</guid>
      <dc:creator>ddraper</dc:creator>
      <dc:date>2016-10-07T14:49:50Z</dc:date>
    </item>
  </channel>
</rss>

