<?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 can I have a dashboard that cannot be modifed by users? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315211#M2212</link>
    <description>&lt;P&gt;Dear you, that's an interesting use case which Laurent could reuse for his blogs &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Sep 2012 19:04:37 GMT</pubDate>
    <dc:creator>Julien_Carsique</dc:creator>
    <dc:date>2012-09-11T19:04:37Z</dc:date>
    <item>
      <title>How can I have a dashboard that cannot be modifed by users?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315209#M2210</link>
      <description>&lt;P&gt;I want a normal user not to be able to modify his dashboard, and i want to make sure he always sees the default dashboard.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2012 17:42:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315209#M2210</guid>
      <dc:creator>Fred_Vadon</dc:creator>
      <dc:date>2012-09-11T17:42:39Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have a dashboard that cannot be modifed by users?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315210#M2211</link>
      <description>&lt;P&gt;Dear me,&lt;/P&gt;
&lt;P&gt;The user dashboard is a document that is automatically copied from the default dashboard defined by the Admin. So you can set any permission you want on this "document". In your case, what you would do, is make sure everyone accesses the default dashboard (not theirs) and give read permission on the default dashboard that is by default restricted to the Administrator. So you need to follow several steps:&lt;/P&gt;
&lt;H3&gt;First Step : always display the default dashboard instead of the user dashboard to Studio&lt;/H3&gt;
&lt;P&gt;Add an xml contrib to studio so that the defaultdashboard is always displayed instead of the default.
Here is the contrib to add in Studio :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;require&amp;gt;org.nuxeo.ecm.user.center.dashboard.opensocial.spaceprovider&amp;lt;/require&amp;gt;
&amp;lt;extension target="org.nuxeo.ecm.spaces.core.spacemanager.service"
    point="spaceProviders"&amp;gt;
    &amp;lt;spaceProvider name="userDashboardSpaceProvider"&amp;gt;
      &amp;lt;class&amp;gt;
        org.nuxeo.ecm.user.center.dashboard.DefaultDashboardSpaceProvider
      &amp;lt;/class&amp;gt;
    &amp;lt;/spaceProvider&amp;gt;
  &amp;lt;/extension&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;H3&gt;Second step : add read permission to the defaultdashboard which is not the case by default&lt;/H3&gt;
&lt;H4&gt;For an existing application&lt;/H4&gt;
&lt;P&gt;If the application is already deployed, the permission all already set on the default dashboard so we need to change them.
We will need to access it, but this a not an easy access doc &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; We will use Nuxeo Shell&lt;/P&gt;
&lt;P&gt;Go to the adress :&lt;/P&gt;
&lt;P&gt;yourServer/nuxeo/site/shell (in my case &lt;A href="http://localhost:8080/nuxeo/site/shell)" target="test_blank"&gt;http://localhost:8080/nuxeo/site/shell)&lt;/A&gt;, it should launch a java applet.
Type the following commands :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;connect -u Administrator (or whatever user is an Admin, it should prompt the pwd) 
cd management/dashboard-management/ (if you do a ls in there you'll see the defaultdashboardSpace) 
perms defaultDashboardSpace/ (it will show you the permissions) 
perms -grant "Everyone:Read" defaultDashboardSpace/ (it will update the property) 
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And then when you access the dashboard from a standard user (after redeploying the Studio project of course), you'll always see the same dashboard, in read-only mode.&lt;/P&gt;
&lt;H4&gt;For a new application (or a reset of the database)&lt;/H4&gt;
&lt;P&gt;The pb with the solution above is that if you redeploy a new database, you will have to redo the permission granting, which is not something you want. So let's use Studio to make sure we add the read permission whenever the defaultDashBoardSpace is created.&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;P&gt;Add the document type in the registries (AdvancedSettings &amp;gt;Registries&amp;gt; Doc Types :&lt;/P&gt;
&lt;P&gt;{
doctypes: {
Space: {
parent:"Document",}
}
}&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Add an event handler on document created for type Space and with document path starts with : /management/dashboard-management/&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;&lt;P&gt;Add an automation chain that grant read permission to everyone and bind it to the event handler.&lt;/P&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Deploy your bundle before anyone accesses the home dashboard on a newly created database and you are (should be) good to go!&lt;/P&gt;
&lt;H3&gt;One more thing&lt;/H3&gt;
&lt;P&gt;The dashboard cannot be modified by a non admin anymore but you still see the top right buttons for modifying it, it will show errors if you try to &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you want to remove those buttons, you will have to overidde the xhtml template layout of the page.
The file you want to override is :&lt;/P&gt;
&lt;P&gt;/nuxeo/addons/nuxeo-user-center/nuxeo-user-dashboard/nuxeo-user-dashboard-opensocial/src/main/resources/web/nuxeo.war/incl/dashboard/user_opensocial_dashboard.xhtml (to be updated whith the github link when it's back...)&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2012 17:43:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315210#M2211</guid>
      <dc:creator>Fred_Vadon</dc:creator>
      <dc:date>2012-09-11T17:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have a dashboard that cannot be modifed by users?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315211#M2212</link>
      <description>&lt;P&gt;Dear you, that's an interesting use case which Laurent could reuse for his blogs &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2012 19:04:37 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315211#M2212</guid>
      <dc:creator>Julien_Carsique</dc:creator>
      <dc:date>2012-09-11T19:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have a dashboard that cannot be modifed by users?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315212#M2213</link>
      <description>&lt;P&gt;Interesting article/question. I've tried the above Nuxeo shell procedure with a test system and it works, however if I use a development system started under Eclipse there is no defaultDashboeardSpace just an empty container. Any comments?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2012 22:24:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315212#M2213</guid>
      <dc:creator>karl_harris_</dc:creator>
      <dc:date>2012-09-11T22:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have a dashboard that cannot be modifed by users?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315213#M2214</link>
      <description>&lt;P&gt;The dashboard is created when accessed for the first time, so It might be the issue here. The other solution is that you only CAP deploy and not DM, if so you should only see a static dashboard, and I don't think the dynamic one is created in that case (did not checked though)&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2012 07:41:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315213#M2214</guid>
      <dc:creator>Fred_Vadon</dc:creator>
      <dc:date>2012-09-12T07:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have a dashboard that cannot be modifed by users?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315214#M2215</link>
      <description>&lt;P&gt;Hi Fred, what part exactly I have to modify if I want to hidden the buttons&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2013 15:45:31 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315214#M2215</guid>
      <dc:creator>geekonspace</dc:creator>
      <dc:date>2013-04-25T15:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I have a dashboard that cannot be modifed by users?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315215#M2216</link>
      <description>&lt;P&gt;Hi, I created another myopensocial_container_template.xhtml file, deleted the lines from insert buttons  so I could hide this buttons&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2013 16:22:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/how-can-i-have-a-dashboard-that-cannot-be-modifed-by-users/m-p/315215#M2216</guid>
      <dc:creator>geekonspace</dc:creator>
      <dc:date>2013-04-25T16:22:57Z</dc:date>
    </item>
  </channel>
</rss>

