<?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: With DM and DAM enabled how would I force certain users to default to the DAM tab on Login? in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324050#M11051</link>
    <description>&lt;P&gt;DM tab is a simple action, so you just have to override it. Here is the definition of this action:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;action id="documents" link="view_documents"
  label="label.main.tab.documents" order="40"&amp;gt;
  &amp;lt;category&amp;gt;MAIN_TABS&amp;lt;/category&amp;gt;
&amp;lt;/action&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;defined into the org.nuxeo.ecm.platform.actions component (don't forget to add the require item in your xml)
So your contribution must something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; &amp;lt;component name="name.you.want.for.you.component"&amp;gt;
 &amp;lt;require&amp;gt;org.nuxeo.ecm.platform.actions&amp;lt;/require&amp;gt;
&amp;lt;extension target="org.nuxeo.ecm.platform.actions.ActionService"
    point="actions"&amp;gt;
&amp;lt;action id="documents" link="view_documents"
  label="label.main.tab.documents" order="40"&amp;gt;
  &amp;lt;category&amp;gt;MAIN_TABS&amp;lt;/category&amp;gt;
  &amp;lt;filter id="yourFilterName"&amp;gt;
    &amp;lt;rule grant="true"&amp;gt;
      &amp;lt;condition&amp;gt;... put here your condition ...&amp;lt;/condition&amp;gt;
    &amp;lt;/rule&amp;gt;
  &amp;lt;/filter&amp;gt;
&amp;lt;/action&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Refer to the &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewExtensionPoint/org.nuxeo.ecm.platform.actions.ActionService--actions"&gt;action documentation&lt;/A&gt; and &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewExtensionPoint/org.nuxeo.ecm.platform.actions.ActionService--filters"&gt;filter documentation&lt;/A&gt; that explain
With that you will limit the visibility of the tab.&lt;/P&gt;
&lt;P&gt;About to not redirect to the DM view, &lt;A href="http://answers.nuxeo.com/questions/411/how-configuring-the-default-page-after-the-user-connexion"&gt;may you will have information here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Hope this will help you.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Feb 2012 17:13:02 GMT</pubDate>
    <dc:creator>Benjamin_Jalon1</dc:creator>
    <dc:date>2012-02-14T17:13:02Z</dc:date>
    <item>
      <title>With DM and DAM enabled how would I force certain users to default to the DAM tab on Login?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324049#M11050</link>
      <description>&lt;P&gt;Some users of DAM are pure consumers of digital assets and will only use the DAM interface. When they first login I would like them to see the DAM ui by default, and I would also like to hide the DM tab for those users. I will put these users into a group called "DAM Only" and then create a filter on the DM tab to hide it (or not show it) for users in the DAM Only group. But how do I re-direct these users to the DAM ui by default?&lt;/P&gt;
&lt;P&gt;Thanks,
Bruce.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 16:45:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324049#M11050</guid>
      <dc:creator>bruce_Grant</dc:creator>
      <dc:date>2012-02-14T16:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: With DM and DAM enabled how would I force certain users to default to the DAM tab on Login?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324050#M11051</link>
      <description>&lt;P&gt;DM tab is a simple action, so you just have to override it. Here is the definition of this action:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;action id="documents" link="view_documents"
  label="label.main.tab.documents" order="40"&amp;gt;
  &amp;lt;category&amp;gt;MAIN_TABS&amp;lt;/category&amp;gt;
&amp;lt;/action&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;defined into the org.nuxeo.ecm.platform.actions component (don't forget to add the require item in your xml)
So your contribution must something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt; &amp;lt;component name="name.you.want.for.you.component"&amp;gt;
 &amp;lt;require&amp;gt;org.nuxeo.ecm.platform.actions&amp;lt;/require&amp;gt;
&amp;lt;extension target="org.nuxeo.ecm.platform.actions.ActionService"
    point="actions"&amp;gt;
&amp;lt;action id="documents" link="view_documents"
  label="label.main.tab.documents" order="40"&amp;gt;
  &amp;lt;category&amp;gt;MAIN_TABS&amp;lt;/category&amp;gt;
  &amp;lt;filter id="yourFilterName"&amp;gt;
    &amp;lt;rule grant="true"&amp;gt;
      &amp;lt;condition&amp;gt;... put here your condition ...&amp;lt;/condition&amp;gt;
    &amp;lt;/rule&amp;gt;
  &amp;lt;/filter&amp;gt;
&amp;lt;/action&amp;gt;
&amp;lt;/component&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Refer to the &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewExtensionPoint/org.nuxeo.ecm.platform.actions.ActionService--actions"&gt;action documentation&lt;/A&gt; and &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/current/viewExtensionPoint/org.nuxeo.ecm.platform.actions.ActionService--filters"&gt;filter documentation&lt;/A&gt; that explain
With that you will limit the visibility of the tab.&lt;/P&gt;
&lt;P&gt;About to not redirect to the DM view, &lt;A href="http://answers.nuxeo.com/questions/411/how-configuring-the-default-page-after-the-user-connexion"&gt;may you will have information here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Hope this will help you.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 17:13:02 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324050#M11051</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-02-14T17:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: With DM and DAM enabled how would I force certain users to default to the DAM tab on Login?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324051#M11052</link>
      <description>&lt;P&gt;The easiest way to redirect the user on the DAM tab is to override the default &lt;CODE&gt;startupHelper&lt;/CODE&gt; used by Nuxeo by a custom one in you own module, something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;import static org.jboss.seam.ScopeType.SESSION;

import org.jboss.seam.annotations.Begin;
import org.jboss.seam.annotations.In;
import org.jboss.seam.annotations.Install;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.nuxeo.ecm.core.api.NuxeoPrincipal;
import org.nuxeo.ecm.platform.ui.web.api.WebActions;
import org.nuxeo.ecm.webapp.helpers.StartupHelper;

@Name("startupHelper")
@Scope(SESSION)
@Install(precedence = 11) // default install precedence APPLICATION is set to 10
public class CustomStartupHelper extends StartupHelper {

    private static final long serialVersionUID = -1L;
    
    @In(create = true)
    protected transient WebActions webActions;

    @Override
    @Begin(id = "#{conversationIdGenerator.nextMainConversationId}", join = true)
    public String initDomainAndFindStartupPage(String domainTitle, String viewId) {
        String result = super.initDomainAndFindStartupPage(domainTitle, viewId);
        NuxeoPrincipal principal = (NuxeoPrincipal) documentManager.getPrincipal();
        if (principal.isMemberOf("DAM Only")) {
            webActions.setCurrentTabIds("MAIN_TABS:dam");
            return "assets";
        } else {
            return result;
        }
    }
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Feb 2012 17:13:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324051#M11052</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2012-02-14T17:13:48Z</dc:date>
    </item>
    <item>
      <title>Re: With DM and DAM enabled how would I force certain users to default to the DAM tab on Login?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324052#M11053</link>
      <description>&lt;P&gt;Thanks - apparently I can only mark one item as answer! But your link to redirect is what I was looking for - and this is shown below.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 17:23:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324052#M11053</guid>
      <dc:creator>bruce_Grant</dc:creator>
      <dc:date>2012-02-14T17:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: With DM and DAM enabled how would I force certain users to default to the DAM tab on Login?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324053#M11054</link>
      <description>&lt;P&gt;thanks Thomas.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 17:24:08 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324053#M11054</guid>
      <dc:creator>bruce_Grant</dc:creator>
      <dc:date>2012-02-14T17:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: With DM and DAM enabled how would I force certain users to default to the DAM tab on Login?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324054#M11055</link>
      <description>&lt;P&gt;No problem, I'm fair, even if I'm answered also to the tab part&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 17:28:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324054#M11055</guid>
      <dc:creator>Benjamin_Jalon1</dc:creator>
      <dc:date>2012-02-14T17:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: With DM and DAM enabled how would I force certain users to default to the DAM tab on Login?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324055#M11056</link>
      <description>&lt;P&gt;Thanks to Thomas and Bjalon for their quick response! I started with the code Thomas suggested, but to make it work I had to modify - mainly because the NuxeoPrincipal object is not available, nor is the CoreSession (documentManager) until Domain is initialized. The code below works as expected.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;@Name("startupHelper")
@Scope(SESSION)
@Install(precedence = Install.APPLICATION + 1)
public class GripStartupHelper extends StartupHelper {

    private static final long serialVersionUID = -1L;

    @In(create = true)
    protected transient WebActions webActions;

    @Override
    @Begin(id = "#{conversationIdGenerator.nextMainConversationId}", join = true)
    public String initDomainAndFindStartupPage(String domainTitle, String viewId) {
        
    	String result = super.initDomainAndFindStartupPage(domainTitle, viewId);
       
        NuxeoPrincipal principal = (NuxeoPrincipal) documentManager.getPrincipal();
        if (principal.isMemberOf("DAM Only")) {
            webActions.setCurrentTabIds("MAIN_TABS:dam");
            return "assets";
        } else {
            return result;
        }
    }
	
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Feb 2012 20:05:17 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324055#M11056</guid>
      <dc:creator>bruce_Grant</dc:creator>
      <dc:date>2012-02-14T20:05:17Z</dc:date>
    </item>
    <item>
      <title>Re: With DM and DAM enabled how would I force certain users to default to the DAM tab on Login?</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324056#M11057</link>
      <description>&lt;P&gt;Thanks, I've updated my answer to reflect your changes.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2012 21:45:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/with-dm-and-dam-enabled-how-would-i-force-certain-users-to/m-p/324056#M11057</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2012-02-14T21:45:42Z</dc:date>
    </item>
  </channel>
</rss>

