gatein SVN: r9038 - epp/docs/branches/6.0/Developer_Guide/en-US.
by do-not-reply@jboss.org
Author: rdickens
Date: 2013-01-08 23:55:45 -0500 (Tue, 08 Jan 2013)
New Revision: 9038
Modified:
epp/docs/branches/6.0/Developer_Guide/en-US/chapter-4-GDG_Portal_Development.xml
Log:
Updated chapter to version 23 of matching chapter in Confluence portal
Modified: epp/docs/branches/6.0/Developer_Guide/en-US/chapter-4-GDG_Portal_Development.xml
===================================================================
--- epp/docs/branches/6.0/Developer_Guide/en-US/chapter-4-GDG_Portal_Development.xml 2013-01-07 12:57:14 UTC (rev 9037)
+++ epp/docs/branches/6.0/Developer_Guide/en-US/chapter-4-GDG_Portal_Development.xml 2013-01-09 04:55:45 UTC (rev 9038)
@@ -22,11 +22,16 @@
<para>
The biggest granularity is what is called "Portal Containers". A Portal Container can host multiple "Sites". Those two components have a unique identifier that can be found in the default URL mapping according to the following scheme: <code><ulink url="http://localhost:8080/"/><portalcontainer>/<site> </code>
</para>
- <para>
- When creating a website, it is possible to create a portal container from scratch or extend an existing one. It is then possible to extend the portal container which is accessed at <ulink url="http://localhost:8080/portal"/> on the out of the box solution, this is the recommended way. While running multiple portal containers is possible, it's usually better to keep those on separate installations. Note that multiple websites can run in a single portal container and share some services.
+ <para>
+ When creating a website, you can either create a portal container or extend an existing one. Extending an existing portal container, such as the default one provided with JBoss Portal Platform, is the recommended option because you only need to customize it to suit your requirements. Another benefit of the extension method is that upgrades consist of copying the newer distribution archives in place of the originals. This upgrade method is not possible if the distribution archives have been modified.
</para>
- <para>
- By providing an extension you can benefit from the portal provided by JBoss Portal Platform and be able to customize the parts you want. The benefit over directly modifying the shipped files is that it will make the updates much easier (by just replacing the archives provided by JBoss Portal Platform).
+ <para>
+ While running multiple portal containers is possible, it's recommended to keep those on separate installations. Note that multiple websites can run in a single portal container and share some services.
+ </para>
+ <para>
+ The procedure for creating portal containers and extending existing portal containers is similar: create an enterprise archive (EAR) containing configuration details, runnable code and static resources.
+ </para>
+
<figure>
<title>Example</title>
<mediaobject>
11 years, 11 months
gatein SVN: r9037 - in epp/docs/branches/6.0/Reference_Guide/en-US: modules/AuthenticationAndIdentity and 1 other directory.
by do-not-reply@jboss.org
Author: ppenicka
Date: 2013-01-07 07:57:14 -0500 (Mon, 07 Jan 2013)
New Revision: 9037
Modified:
epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml
epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIdentity/SSO.xml
Log:
BZ#886289 and BZ#886298 - Implemented changes requested by SME review. The OpenAM and SPNEGO docs are now ready for docs QA.
Modified: epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml 2013-01-07 12:12:01 UTC (rev 9036)
+++ epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml 2013-01-07 12:57:14 UTC (rev 9037)
@@ -8,6 +8,20 @@
<simpara>
<revhistory>
<revision>
+ <revnumber>6.0.0-28</revnumber>
+ <date>Mon Jan 7 2013</date>
+ <author>
+ <firstname>Petr</firstname>
+ <surname>Penicka</surname>
+ <email/>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>BZ#886289 and BZ#886298 - Implemented changes requested by SME review. The OpenAM and SPNEGO docs are now ready for docs QA.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
<revnumber>6.0.0-27</revnumber>
<date>Fri Jan 4 2013</date>
<author>
Modified: epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIdentity/SSO.xml
===================================================================
--- epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIdentity/SSO.xml 2013-01-07 12:12:01 UTC (rev 9036)
+++ epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIdentity/SSO.xml 2013-01-07 12:57:14 UTC (rev 9037)
@@ -1271,7 +1271,7 @@
<section id="sect-Reference_Guide-SSO_Single_Sign_On_-OpenAM-OpenAMserversetup">
<title>OpenAM Server Setup</title>
<para>
- This section contains procedures that need to be followed to set up an OpenAM server for authentication against JBoss Portal Platform. The authentication set up by these procedures is ensured by the JBoss Portal Platform SSO Authentication Plugin. The plugin will be installed in OpenAM and configured to to perform authentication against the portal using a REST callback.
+ This section contains procedures that need to be followed to set up an OpenAM server for authentication against JBoss Portal Platform. The authentication set up by these procedures is ensured by the JBoss Portal Platform SSO Authentication Plugin. The plugin will be installed in OpenAM and configured to perform authentication against the portal using a REST callback.
<note>
<para>
Using the REST callback as presented in this section is not mandatory. You can achieve authentication on the OpenAM side by any other means according to your preference.
@@ -1640,9 +1640,9 @@
Uncomment the following lines:
</para>
<programlisting>
-default_tgs_enctypes = des3-hmac-sha1
-default_tkt_enctypes = des3-hmac-sha1
-permitted_enctypes = des3-hmac-sha1
+default_tgs_enctypes = rc4-hmac
+default_tkt_enctypes = rc4-hmac
+permitted_enctypes = rc4-hmac
</programlisting>
</listitem>
<listitem>
@@ -1671,9 +1671,9 @@
# caches containing ticket encryption types it doesn't know about (such as
# old versions of Sun Java).
- default_tgs_enctypes = des3-hmac-sha1
- default_tkt_enctypes = des3-hmac-sha1
- permitted_enctypes = des3-hmac-sha1
+ default_tgs_enctypes = rc4-hmac
+ default_tkt_enctypes = rc4-hmac
+ permitted_enctypes = rc4-hmac
# The following libdefaults parameters are only for Heimdal Kerberos.
v4_instance_resolve = false
@@ -1716,25 +1716,25 @@
</para>
<programlisting>
[kdcdefaults]
- kdc_ports = 750,88
+kdc_ports = 750,88
[realms]
LOCAL.NETWORK = {
- database_name = /home/gatein/krb5kdc/principal
- admin_keytab = FILE:/home/gatein/krb5kdc/kadm5.keytab
- acl_file = /home/gatein/krb5kdc/kadm5.acl
- key_stash_file = /home/gatein/krb5kdc/stash
+ database_name = /var/lib/krb5kdc/principal
+ admin_keytab = FILE:/etc/krb5.keytab
+ acl_file = /etc/krb5kdc/kadm5.acl
+ key_stash_file = /etc/krb5kdc/stash
kdc_ports = 750,88
max_life = 10h 0m 0s
max_renewable_life = 7d 0h 0m 0s
- master_key_type = des3-hmac-sha1
- supported_enctypes = aes256-cts:normal arcfour-hmac:normal des3-hmac-sha1:normal des-cbc-crc:normal des:normal des:v4 des:norealm des:onlyrealm des:afs3
+ master_key_type = rc4-hmac
+ supported_enctypes = rc4-hmac:normal
default_principal_flags = +preauth
}
[logging]
- kdc = FILE:/home/gatein/krb5logs/kdc.log
- admin_server = FILE:/home/gatein/krb5logs/kadmin.log
+ kdc = FILE:/tmp/kdc.log
+ admin_server = FILE:/tmp/kadmin.log
</programlisting>
</listitem>
<listitem>
11 years, 11 months
gatein SVN: r9036 - in epp/portal/branches/EPP_5_2_Branch/component/portal/src: main/java/org/exoplatform/portal/mop/user and 1 other directories.
by do-not-reply@jboss.org
Author: mputz
Date: 2013-01-07 07:12:01 -0500 (Mon, 07 Jan 2013)
New Revision: 9036
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationService.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationService.java
Log:
Bug 891246 - Remove call of GroupHandler.getAllGroups() method during root user login
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationService.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationService.java 2013-01-07 11:57:33 UTC (rev 9035)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationService.java 2013-01-07 12:12:01 UTC (rev 9036)
@@ -20,6 +20,8 @@
package org.exoplatform.portal.mop.navigation;
import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.SiteType;
+import java.util.List;
/**
* <p>The navigation service takes care of managing the various portal navigations and their nodes. In order to manage
@@ -48,6 +50,16 @@
NavigationContext loadNavigation(SiteKey key) throws NullPointerException, NavigationServiceException;
/**
+ * Find and returns navigations of a given type. Method use discretion is advised
+ *
+ * @param type the navigation type
+ * @return all navigations matching type
+ * @throws NullPointerException if the key is null
+ * @throws NavigationServiceException
+ */
+ List<NavigationContext> loadNavigations(SiteType type) throws NullPointerException, NavigationServiceException;
+
+ /**
* Create, update a navigation. When the navigation state is not null, the navigation
* will be created or updated depending on whether or not the navigation already exists.
*
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java 2013-01-07 11:57:33 UTC (rev 9035)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java 2013-01-07 12:12:01 UTC (rev 9036)
@@ -21,13 +21,11 @@
import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.SiteType;
import org.exoplatform.portal.mop.Visible;
import org.exoplatform.portal.pom.config.POMSession;
import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.portal.pom.data.MappedAttributes;
-import static org.exoplatform.portal.mop.navigation.Utils.*;
-import static org.exoplatform.portal.pom.config.Utils.split;
-
import org.exoplatform.portal.pom.data.Mapper;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
@@ -37,14 +35,19 @@
import org.gatein.mop.api.workspace.Site;
import org.gatein.mop.api.workspace.Workspace;
import org.gatein.mop.api.workspace.link.PageLink;
-
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import java.util.Set;
+import static org.exoplatform.portal.mop.navigation.Utils.objectType;
+import static org.exoplatform.portal.pom.config.Utils.split;
+
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
@@ -93,6 +96,31 @@
return data != null && data != NavigationData.EMPTY ? new NavigationContext(data) : null;
}
+ @Override
+ public List<NavigationContext> loadNavigations(SiteType type) throws NullPointerException, NavigationServiceException
+ {
+ if(type == null)
+ {
+ throw new NullPointerException();
+ }
+
+ POMSession session = manager.getSession();
+ ObjectType<Site> objectType = objectType(type);
+ Collection<Site> sites = session.getWorkspace().getSites(objectType);
+
+ List<NavigationContext> navigations = new LinkedList<NavigationContext>();
+ for(Site site : sites)
+ {
+ Navigation defaultNavigation = site.getRootNavigation().getChild("default");
+ if(defaultNavigation != null)
+ {
+ SiteKey key = new SiteKey(type, site.getName());
+ navigations.add(new NavigationContext(new NavigationData(key, defaultNavigation)));
+ }
+ }
+ return navigations;
+ }
+
public void saveNavigation(NavigationContext navigation) throws NullPointerException, NavigationServiceException
{
if (navigation == null)
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java 2013-01-07 11:57:33 UTC (rev 9035)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java 2013-01-07 12:12:01 UTC (rev 9036)
@@ -23,6 +23,8 @@
import org.exoplatform.portal.mop.EventType;
import org.exoplatform.portal.mop.SiteKey;
import static org.exoplatform.portal.mop.navigation.Utils.*;
+
+import org.exoplatform.portal.mop.SiteType;
import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.services.cache.CacheService;
import org.exoplatform.services.jcr.RepositoryService;
@@ -34,6 +36,7 @@
import org.gatein.mop.api.workspace.Site;
import org.picocontainer.Startable;
+import java.util.List;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
@@ -101,6 +104,12 @@
return service.loadNavigation(key);
}
+ @Override
+ public List<NavigationContext> loadNavigations(SiteType type) throws NullPointerException, NavigationServiceException
+ {
+ return service.loadNavigations(type);
+ }
+
public void saveNavigation(NavigationContext navigation) throws NullPointerException, NavigationServiceException
{
boolean created = navigation.data == null;
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java 2013-01-07 11:57:33 UTC (rev 9035)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java 2013-01-07 12:12:01 UTC (rev 9036)
@@ -19,13 +19,6 @@
package org.exoplatform.portal.mop.user;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Locale;
-
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
@@ -39,6 +32,12 @@
import org.exoplatform.portal.mop.navigation.Scope;
import org.exoplatform.portal.mop.navigation.VisitMode;
import org.exoplatform.services.organization.Group;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Locale;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -124,38 +123,45 @@
navigations.add(new UserNavigation(this, userNavigation, true));
}
- //
- Collection<?> groups;
- try
+ // Add group navigations
+ if(service.getUserACL().getSuperUser().equals(userName))
{
- if (service.getUserACL().getSuperUser().equals(userName))
+ List<NavigationContext> navCtxs = service.getNavigationService().loadNavigations(SiteType.GROUP);
+ for(NavigationContext navCtx : navCtxs)
{
- groups = service.getOrganizationService().getGroupHandler().getAllGroups();
+ if(!navCtx.getKey().getName().equals(service.getUserACL().getGuestsGroup()))
+ {
+ navigations.add(new UserNavigation(this, navCtx, true));
+ }
}
- else
+ }
+ else
+ {
+ Collection<?> groups;
+ try
{
groups = service.getOrganizationService().getGroupHandler().findGroupsOfUser(userName);
}
- }
- catch (Exception e)
- {
- throw new UserPortalException("Could not retrieve groups", e);
- }
+ catch (Exception e)
+ {
+ throw new UserPortalException("Could not retrieve groups", e);
+ }
- //
- for (Object group : groups)
- {
- Group m = (Group)group;
- String groupId = m.getId().trim();
- if (!groupId.equals(service.getUserACL().getGuestsGroup()))
+ //
+ for (Object group : groups)
{
- NavigationContext groupNavigation = service.getNavigationService().loadNavigation(SiteKey.group(groupId));
- if (groupNavigation != null && groupNavigation.getState() != null)
+ Group m = (Group)group;
+ String groupId = m.getId().trim();
+ if (!groupId.equals(service.getUserACL().getGuestsGroup()))
{
- navigations.add(new UserNavigation(
- this,
- groupNavigation,
- service.getUserACL().hasEditPermissionOnNavigation(groupNavigation.getKey())));
+ NavigationContext groupNavigation = service.getNavigationService().loadNavigation(SiteKey.group(groupId));
+ if (groupNavigation != null && groupNavigation.getState() != null)
+ {
+ navigations.add(new UserNavigation(
+ this,
+ groupNavigation,
+ service.getUserACL().hasEditPermissionOnNavigation(groupNavigation.getKey())));
+ }
}
}
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationService.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationService.java 2013-01-07 11:57:33 UTC (rev 9035)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationService.java 2013-01-07 12:12:01 UTC (rev 9036)
@@ -21,6 +21,7 @@
import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.SiteType;
import org.exoplatform.portal.mop.Visibility;
import org.exoplatform.portal.pom.data.MappedAttributes;
import org.gatein.mop.api.workspace.Navigation;
@@ -31,6 +32,7 @@
import javax.jcr.NodeIterator;
import javax.jcr.Session;
import java.util.Iterator;
+import java.util.List;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -44,6 +46,12 @@
assertNull(service.loadNavigation(SiteKey.portal("non_existing")));
}
+ public void testLoadNavigations() throws Exception
+ {
+ List<NavigationContext> navCtxs = service.loadNavigations(SiteType.PORTAL);
+ assertEquals(3, navCtxs.size());
+ }
+
public void testLoadSingleScope() throws Exception
{
NavigationContext nav = service.loadNavigation(SiteKey.portal("classic"));
11 years, 11 months
gatein SVN: r9035 - in epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src: main/java/org/exoplatform/portal/mop/user and 1 other directories.
by do-not-reply@jboss.org
Author: mputz
Date: 2013-01-07 06:57:33 -0500 (Mon, 07 Jan 2013)
New Revision: 9035
Modified:
epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationService.java
epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java
epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java
epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java
epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationService.java
Log:
Bug 891247 - One-off patch to remove call of GroupHandler.getAllGroups() method during root user login
Modified: epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationService.java
===================================================================
--- epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationService.java 2013-01-04 15:38:52 UTC (rev 9034)
+++ epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationService.java 2013-01-07 11:57:33 UTC (rev 9035)
@@ -20,6 +20,8 @@
package org.exoplatform.portal.mop.navigation;
import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.SiteType;
+import java.util.List;
/**
* <p>The navigation service takes care of managing the various portal navigations and their nodes. In order to manage
@@ -48,6 +50,16 @@
NavigationContext loadNavigation(SiteKey key) throws NullPointerException, NavigationServiceException;
/**
+ * Find and returns navigations of a given type. Method use discretion is advised
+ *
+ * @param type the navigation type
+ * @return all navigations matching type
+ * @throws NullPointerException if the key is null
+ * @throws NavigationServiceException
+ */
+ List<NavigationContext> loadNavigations(SiteType type) throws NullPointerException, NavigationServiceException;
+
+ /**
* Create, update a navigation. When the navigation state is not null, the navigation
* will be created or updated depending on whether or not the navigation already exists.
*
Modified: epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java
===================================================================
--- epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java 2013-01-04 15:38:52 UTC (rev 9034)
+++ epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java 2013-01-07 11:57:33 UTC (rev 9035)
@@ -21,13 +21,11 @@
import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.SiteType;
import org.exoplatform.portal.mop.Visible;
import org.exoplatform.portal.pom.config.POMSession;
import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.portal.pom.data.MappedAttributes;
-import static org.exoplatform.portal.mop.navigation.Utils.*;
-import static org.exoplatform.portal.pom.config.Utils.split;
-
import org.exoplatform.portal.pom.data.Mapper;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
@@ -37,14 +35,19 @@
import org.gatein.mop.api.workspace.Site;
import org.gatein.mop.api.workspace.Workspace;
import org.gatein.mop.api.workspace.link.PageLink;
-
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import java.util.Set;
+import static org.exoplatform.portal.mop.navigation.Utils.objectType;
+import static org.exoplatform.portal.pom.config.Utils.split;
+
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
@@ -93,6 +96,31 @@
return data != null && data != NavigationData.EMPTY ? new NavigationContext(data) : null;
}
+ @Override
+ public List<NavigationContext> loadNavigations(SiteType type) throws NullPointerException, NavigationServiceException
+ {
+ if(type == null)
+ {
+ throw new NullPointerException();
+ }
+
+ POMSession session = manager.getSession();
+ ObjectType<Site> objectType = objectType(type);
+ Collection<Site> sites = session.getWorkspace().getSites(objectType);
+
+ List<NavigationContext> navigations = new LinkedList<NavigationContext>();
+ for(Site site : sites)
+ {
+ Navigation defaultNavigation = site.getRootNavigation().getChild("default");
+ if(defaultNavigation != null)
+ {
+ SiteKey key = new SiteKey(type, site.getName());
+ navigations.add(new NavigationContext(new NavigationData(key, defaultNavigation)));
+ }
+ }
+ return navigations;
+ }
+
public void saveNavigation(NavigationContext navigation) throws NullPointerException, NavigationServiceException
{
if (navigation == null)
Modified: epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java
===================================================================
--- epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java 2013-01-04 15:38:52 UTC (rev 9034)
+++ epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java 2013-01-07 11:57:33 UTC (rev 9035)
@@ -23,6 +23,8 @@
import org.exoplatform.portal.mop.EventType;
import org.exoplatform.portal.mop.SiteKey;
import static org.exoplatform.portal.mop.navigation.Utils.*;
+
+import org.exoplatform.portal.mop.SiteType;
import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.services.cache.CacheService;
import org.exoplatform.services.jcr.RepositoryService;
@@ -34,6 +36,7 @@
import org.gatein.mop.api.workspace.Site;
import org.picocontainer.Startable;
+import java.util.List;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
@@ -101,6 +104,12 @@
return service.loadNavigation(key);
}
+ @Override
+ public List<NavigationContext> loadNavigations(SiteType type) throws NullPointerException, NavigationServiceException
+ {
+ return service.loadNavigations(type);
+ }
+
public void saveNavigation(NavigationContext navigation) throws NullPointerException, NavigationServiceException
{
boolean created = navigation.data == null;
Modified: epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java
===================================================================
--- epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java 2013-01-04 15:38:52 UTC (rev 9034)
+++ epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java 2013-01-07 11:57:33 UTC (rev 9035)
@@ -19,13 +19,6 @@
package org.exoplatform.portal.mop.user;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Locale;
-
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
@@ -39,6 +32,12 @@
import org.exoplatform.portal.mop.navigation.Scope;
import org.exoplatform.portal.mop.navigation.VisitMode;
import org.exoplatform.services.organization.Group;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Locale;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -124,38 +123,45 @@
navigations.add(new UserNavigation(this, userNavigation, true));
}
- //
- Collection<?> groups;
- try
+ // Add group navigations
+ if(service.getUserACL().getSuperUser().equals(userName))
{
- if (service.getUserACL().getSuperUser().equals(userName))
+ List<NavigationContext> navCtxs = service.getNavigationService().loadNavigations(SiteType.GROUP);
+ for(NavigationContext navCtx : navCtxs)
{
- groups = service.getOrganizationService().getGroupHandler().getAllGroups();
+ if(!navCtx.getKey().getName().equals(service.getUserACL().getGuestsGroup()))
+ {
+ navigations.add(new UserNavigation(this, navCtx, true));
+ }
}
- else
+ }
+ else
+ {
+ Collection<?> groups;
+ try
{
groups = service.getOrganizationService().getGroupHandler().findGroupsOfUser(userName);
}
- }
- catch (Exception e)
- {
- throw new UserPortalException("Could not retrieve groups", e);
- }
+ catch (Exception e)
+ {
+ throw new UserPortalException("Could not retrieve groups", e);
+ }
- //
- for (Object group : groups)
- {
- Group m = (Group)group;
- String groupId = m.getId().trim();
- if (!groupId.equals(service.getUserACL().getGuestsGroup()))
+ //
+ for (Object group : groups)
{
- NavigationContext groupNavigation = service.getNavigationService().loadNavigation(SiteKey.group(groupId));
- if (groupNavigation != null && groupNavigation.getState() != null)
+ Group m = (Group)group;
+ String groupId = m.getId().trim();
+ if (!groupId.equals(service.getUserACL().getGuestsGroup()))
{
- navigations.add(new UserNavigation(
- this,
- groupNavigation,
- service.getUserACL().hasEditPermissionOnNavigation(groupNavigation.getKey())));
+ NavigationContext groupNavigation = service.getNavigationService().loadNavigation(SiteKey.group(groupId));
+ if (groupNavigation != null && groupNavigation.getState() != null)
+ {
+ navigations.add(new UserNavigation(
+ this,
+ groupNavigation,
+ service.getUserACL().hasEditPermissionOnNavigation(groupNavigation.getKey())));
+ }
}
}
}
Modified: epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationService.java
===================================================================
--- epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationService.java 2013-01-04 15:38:52 UTC (rev 9034)
+++ epp/portal/branches/EPP_5_2_2_GA_BZ851985_BZ861377_BZ891247/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationService.java 2013-01-07 11:57:33 UTC (rev 9035)
@@ -21,6 +21,7 @@
import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.SiteType;
import org.exoplatform.portal.mop.Visibility;
import org.exoplatform.portal.pom.data.MappedAttributes;
import org.gatein.mop.api.workspace.Navigation;
@@ -31,6 +32,7 @@
import javax.jcr.NodeIterator;
import javax.jcr.Session;
import java.util.Iterator;
+import java.util.List;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -44,6 +46,12 @@
assertNull(service.loadNavigation(SiteKey.portal("non_existing")));
}
+ public void testLoadNavigations() throws Exception
+ {
+ List<NavigationContext> navCtxs = service.loadNavigations(SiteType.PORTAL);
+ assertEquals(3, navCtxs.size());
+ }
+
public void testLoadSingleScope() throws Exception
{
NavigationContext nav = service.loadNavigation(SiteKey.portal("classic"));
11 years, 11 months
gatein SVN: r9034 - epp/docs/branches/6.0/Reference_Guide/en-US.
by do-not-reply@jboss.org
Author: ppenicka
Date: 2013-01-04 10:38:52 -0500 (Fri, 04 Jan 2013)
New Revision: 9034
Modified:
epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml
Log:
BZ#886289 and BZ#886298 - Final version of OpenAM and SPNEGO single sign-on docs as submitted for SME review. Bonus: cleaned up File Name Conventions in Preface - removed unused abbreviations and made the descriptions more accurate.
Modified: epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml 2013-01-04 15:23:42 UTC (rev 9033)
+++ epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml 2013-01-04 15:38:52 UTC (rev 9034)
@@ -9,7 +9,7 @@
<revhistory>
<revision>
<revnumber>6.0.0-27</revnumber>
- <date>Fri Jan 4 2012</date>
+ <date>Fri Jan 4 2013</date>
<author>
<firstname>Petr</firstname>
<surname>Penicka</surname>
11 years, 11 months
gatein SVN: r9033 - in epp/docs/branches/6.0/Reference_Guide/en-US: modules/AuthenticationAndIdentity and 1 other directory.
by do-not-reply@jboss.org
Author: ppenicka
Date: 2013-01-04 10:23:42 -0500 (Fri, 04 Jan 2013)
New Revision: 9033
Modified:
epp/docs/branches/6.0/Reference_Guide/en-US/Preface.xml
epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml
epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIdentity/SSO.xml
Log:
BZ#886289 and BZ#886298 - Final version of OpenAM and SPNEGO single sign-on docs as submitted for SME review. Bonus: cleaned up File Name Conventions in Preface - removed unused abbreviations and made the descriptions more accurate.
Modified: epp/docs/branches/6.0/Reference_Guide/en-US/Preface.xml
===================================================================
--- epp/docs/branches/6.0/Reference_Guide/en-US/Preface.xml 2013-01-03 04:58:33 UTC (rev 9032)
+++ epp/docs/branches/6.0/Reference_Guide/en-US/Preface.xml 2013-01-04 15:23:42 UTC (rev 9033)
@@ -7,9 +7,7 @@
<title>Preface</title>
<section id="sect-File_Name_Conventions">
<title>File Name Conventions</title>
- <para>The following naming conventions are used in file paths for readability. Each convention is styled so that it stands out from the rest of text:
-
-
+ <para>The following naming conventions are used in file paths to improve their readability. Each convention is styled so that it stands out from the rest of the text:
</para>
<variablelist id="vari-Reference_Guide-Introduction-Devices">
<varlistentry>
@@ -17,24 +15,25 @@
<replaceable>CAS_DIR</replaceable>
</term>
<listitem>
- <para>The installation root of the Central Authentication Service (CAS) Single Sign-on Framework. This directory is an arbitrary location chosen when CAS is downloaded and installed.</para>
+ <para>
+ The installation root of the Central Authentication Service (CAS) single sign-on framework. This directory is an arbitrary location chosen when CAS is downloaded and installed.
+ </para>
+ <para>
+ This convention is mainly used in <xref linkend="sect-SSO_Single_Sign_On_-Central_Authentication_Service" />.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
<term>
- <replaceable>HTTPD_DIST</replaceable>
- </term>
- <listitem>
- <para>The installation root of the Apache httpd server. Apache httpd is a web server used to deploy non-java based applications such as CGI or PHP. This directory contains the main folders that comprise the server such as <filename>/conf</filename>, <filename>/webapps</filename>, and <filename>/bin</filename>. </para>
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>
<replaceable>ID_HOME</replaceable>
</term>
<listitem>
<para>
-The <filename>JPP_SERVER/gatein/gatein.ear/portal.war/WEB-INF/conf/organization/</filename> directory, which contains identity-related configuration resources. This abbreviation is used primarily in <xref linkend="chap-LDAP_Integration"/>.</para>
+ The <filename>JPP_SERVER/gatein/gatein.ear/portal.war/WEB-INF/conf/organization/</filename> directory, which contains identity-related configuration resources.
+ </para>
+ <para>
+ This convention is mainly used in <xref linkend="chap-LDAP_Integration" />.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -42,10 +41,12 @@
<replaceable>JPP_DIST</replaceable>
</term>
<listitem>
- <para>The installation root of the JBoss Enterprise Application Platform instance. This folder contains the application server directory, as well as supplemental folders containing resources necessary for gatein-management and gatein-sso. that comprise the server such as <filename>/bin</filename>, <filename>/standalone</filename>, and <filename>/gatein</filename>.
- </para>
- <para>For example, if the JBoss Portal Platform binary is extracted to <filename>/opt/jboss/JPP/</filename> directory, the <replaceable>JPP_DIST</replaceable> directory is <filename>/opt/jboss/JPP</filename>.
- </para>
+ <para>
+ The installation root of the JBoss Portal Platform instance. For example, if the JBoss Portal Platform distribution archive is extracted to the <filename>/opt/jboss/JPP/</filename> directory, the <replaceable>JPP_DIST</replaceable> directory is <filename>/opt/jboss/JPP</filename>.
+ </para>
+ <para>
+ This directory contains the <filename>jboss-jpp-<replaceable><VERSION></replaceable></filename>, <filename>gatein-management</filename> and <filename>gatein-sso</filename> directories.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
@@ -53,28 +54,24 @@
<replaceable>JPP_SERVER</replaceable>
</term>
<listitem>
- <para>The directory containing the application server, and the configuration files necessary to run JBoss Portal Platform.</para>
- <para>This directory contains directories such as <filename>/bin</filename>, <filename>/standalone</filename>, and <filename>/gatein</filename>.
-</para>
- <para>Using the example in <replaceable>JPP_DIST</replaceable>, the <replaceable>JPP_SERVER</replaceable> directory is <filename>/opt/jboss/JPP/jboss-jpp-&VY;/</filename>. </para>
+ <para>
+ The <filename>JPP_DIST/jboss-jpp-<replaceable><VERSION></replaceable></filename> directory, which contains the application server and the configuration files necessary to run JBoss Portal Platform.
+ </para>
</listitem>
</varlistentry>
<varlistentry>
<term>
- <replaceable>PORTAL_SSO</replaceable>
+ <replaceable>TOMCAT_HOME</replaceable>
</term>
<listitem>
- <para>The directories and files located in the <filename><filename>JPP_DIST</filename>/gatein-sso</filename> directory of the JBoss Portal Platform binary package. Used throughout <xref linkend="sect-Reference_Guide-SSO_Single_Sign_On"/>.</para>
+ <para>
+ The installation root of the Apache Tomcat server. Apache Tomcat is a simple Java-based web server that can host servlets or JSP applications. It is not a part of JBoss Portal Platform, however, it is used in various examples in this guide to host single sign-on authentication services.
+ </para>
+ <para>
+ This convention is mainly used in <xref linkend="sect-Reference_Guide-SSO_Single_Sign_On"/>.
+ </para>
</listitem>
</varlistentry>
- <varlistentry>
- <term>
- <replaceable>TOMCAT_DIST</replaceable>
- </term>
- <listitem>
- <para>The installation root of the Apache Tomcat server. Apache Tomcat is a simple Java-based web server that can host servlet or JSP applications. This directory contains the main folders that comprise the server such as <filename>/bin</filename>, <filename>/conf</filename>, <filename>/webapps</filename>, and <filename>/lib</filename>.</para>
- </listitem>
- </varlistentry>
</variablelist>
</section>
<!-- FOR PUBLICAN --> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="Common_Content/Conventions.xml">
Modified: epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml 2013-01-03 04:58:33 UTC (rev 9032)
+++ epp/docs/branches/6.0/Reference_Guide/en-US/Revision_History.xml 2013-01-04 15:23:42 UTC (rev 9033)
@@ -8,6 +8,20 @@
<simpara>
<revhistory>
<revision>
+ <revnumber>6.0.0-27</revnumber>
+ <date>Fri Jan 4 2012</date>
+ <author>
+ <firstname>Petr</firstname>
+ <surname>Penicka</surname>
+ <email/>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>BZ#886289 and BZ#886298 - Final version of OpenAM and SPNEGO single sign-on docs as submitted for SME review. Bonus: cleaned up File Name Conventions in Preface - removed unused abbreviations and made the descriptions more accurate.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <revision>
<revnumber>6.0.0-26</revnumber>
<date>Mon Dec 21 2012</date>
<author>
Modified: epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIdentity/SSO.xml
===================================================================
--- epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIdentity/SSO.xml 2013-01-03 04:58:33 UTC (rev 9032)
+++ epp/docs/branches/6.0/Reference_Guide/en-US/modules/AuthenticationAndIdentity/SSO.xml 2013-01-04 15:23:42 UTC (rev 9033)
@@ -64,10 +64,6 @@
All the packages required for SSO setup can be found in the <filename><filename>JPP_DIST</filename>/gatein-sso</filename> directory of the JBoss Portal Platform binary package.
</para>
- <para>
- In the following scenarios this directory will be referred to as <replaceable>PORTAL_SSO</replaceable>.
- </para>
-
<warning>
<para>
Users are advised to not run any portal extensions that could override the data when manipulating the <filename>gatein.ear</filename> file directly.
@@ -83,7 +79,7 @@
<title><remark>BZ#856430</remark>Central Authentication Service (CAS)</title>
<para>
- The CAS single sign-on (SSO) plug-in enables seamless integration between the platform and the CAS SSO framework. General information about CAS can be found on the <ulink url="http://www.jasig.org/cas">Jasig website</ulink> .
+ The CAS single sign-on (SSO) plug-in enables seamless integration between the platform and the CAS SSO framework. General information about CAS can be found on the <ulink url="http://www.jasig.org/cas">Jasig website</ulink>.
</para>
<section id="sect-CAS-Authentication_Process">
@@ -295,7 +291,7 @@
<step>
<para>
- Open <code>CAS_DIR/cas-server-webapp/src/main/webapp/WEB-INF/deployerConfigContext.xml</code> .
+ Open <code>CAS_DIR/cas-server-webapp/src/main/webapp/WEB-INF/deployerConfigContext.xml</code>.
</para>
</step>
@@ -306,7 +302,7 @@
<note>
<para>
- This configuration is available in the <code><replaceable>PORTAL_SSO</replaceable>/cas.war/WEB-INF/deployerConfigContext.xml</code>. If you choose to take this configuration file, ensure the default host, port and context parameters are adjusted to match the values corresponding to the remote portal instance.
+ This configuration is available in the <code><replaceable>JPP_DIST</replaceable>gatein-sso/cas/plugin/WEB-INF/deployerConfigContext.xml</code> file. If you choose to take this configuration file, ensure the default host, port and context parameters are adjusted to match the values corresponding to the remote portal instance.
</para>
</note>
<programlisting>
@@ -324,7 +320,7 @@
<step>
<para>
- Copy all jars from <code>PORTAL_SSO/cas/plugin/WEB-INF/lib/ </code>to the <code>CAS_DIR/cas-server-webapp/src/main/webapp/WEB-INF/lib</code> directory.
+ Copy all jars from <code><replaceable>JPP_DIST</replaceable>gatein-sso/cas/plugin/WEB-INF/lib/</code> to the <code>CAS_DIR/cas-server-webapp/src/main/webapp/WEB-INF/lib</code> directory.
</para>
</step>
</procedure>
@@ -435,13 +431,13 @@
<step>
<para>
- Extract and install the binary on the server that is required to host CAS. This directory is now referred to as <replaceable>TOMCAT_DIST</replaceable>.
+ Extract and install the binary on the server that is required to host CAS. This directory is now referred to as <replaceable>TOMCAT_HOME</replaceable>.
</para>
</step>
<step>
<para>
- Edit <filename>TOMCAT_DIST/conf/server.xml</filename> and change port 8080 to 8888 to avoid a conflict with the default JBoss Portal Platform listen port.
+ Edit <filename>TOMCAT_HOME/conf/server.xml</filename> and change port 8080 to 8888 to avoid a conflict with the default JBoss Portal Platform listen port.
</para>
<remark>BZ#856430 - jmorgan - Added the new ports from the Confluence SSO Server Setup section</remark>
<important>
@@ -663,7 +659,7 @@
<step>
<para>
- Copy <filename>CAS_DIR/cas-server-webapp/target/cas.war</filename> to <filename>TOMCAT_DIST/webapps</filename>.
+ Copy <filename>CAS_DIR/cas-server-webapp/target/cas.war</filename> to <filename>TOMCAT_HOME/webapps</filename>.
</para>
</step>
@@ -1246,15 +1242,15 @@
<section id="sect-Reference_Guide-SSO_Single_Sign_On_-OpenAM">
<title>OpenAM</title>
<para>
- OpenAM is an open source access management, entitlements and federation server platform. It is a successor of OpenSSO, the access management and federation server platform by Oracle. Integration with OpenSSO is supported in JBoss Enterprise Portal Platform 5. As the development of OpenSSO has been discontinued, the OpenSSO integration has been replaced with OpenAM integration in JBoss Portal Platform 6.
+ OpenAM is an open source access management, entitlements and federation server platform. It is a successor of OpenSSO, the access management and federation server platform whose integration was available in JBoss Enterprise Portal Platform 5. As the development of OpenSSO has been discontinued, the OpenSSO integration has been replaced with OpenAM integration in JBoss Portal Platform 6.
</para>
<section id="sect-Reference_Guide-SSO_Single_Sign_On_-OpenAM-Login-Workflow">
<title>Login and Logout Workflow</title>
<para>
- When the OpenAM integration is configured and a user clicks the <guibutton>Sign in</guibutton> link on a JBoss Portal Platform page, they are redirected to the OpenAM login screen, where they provide their login credentials. Authentication on the OpenAM server side is performed by the JBoss Portal Platform SSO Authentication Plugin. The plugin sends a REST request to JBoss Portal Platform, obtains a response and authenticates the user on the OpenAM side based on the response.
+ When the OpenAM integration is configured and a user clicks the <guibutton>Sign in</guibutton> link on a JBoss Portal Platform page, they are redirected to the OpenAM login screen, where they provide their login credentials. Authentication on the OpenAM server side is performed by the JBoss Portal Platform SSO Authentication Plugin. The plugin sends a REST request to JBoss Portal Platform, obtains a response, and authenticates the user on the OpenAM side based on the response.
</para>
<para>
- After successful authentication with OpenAM, an OpenAM authentication ticket is stored in the <systemitem>iPlanetDirectoryPro</systemitem> cookie in the client browser and the user is redirected back to the portal page. When the portal page is requested, the <systemitem>InitiateLoginFilter</systemitem> iterceptor delegates validation of the OpenAM ticket to the <systemitem>OpenSSOAgent</systemitem> component. The component uses the OpenAM REST API to perform validation of the ticket with the OpenAM server via a back channel. After successful validation, user identity is established and the user is logged in to JBoss Portal Platform.
+ After successful authentication with OpenAM, an OpenAM authentication ticket is stored in the <systemitem>iPlanetDirectoryPro</systemitem> cookie in the client browser and the user is redirected back to the portal page. When the portal page is requested, the <systemitem>InitiateLoginFilter</systemitem> iterceptor delegates validation of the OpenAM ticket to the <systemitem>OpenSSOAgent</systemitem> component. The <systemitem>OpenSSOAgent</systemitem> then uses the OpenAM REST API to perform back channel validation of the ticket with the OpenAM server. After successful validation, user identity is established and the user is logged in to JBoss Portal Platform.
</para>
<para>
When logout is requested by clicking the <guibutton>Sign out</guibutton> button on a portal page, the <emphasis role="italics">OpenSSOLogoutFilter</emphasis> interceptor performs logout on both JBoss Portal Platform and the OpenAM server.
@@ -1275,7 +1271,12 @@
<section id="sect-Reference_Guide-SSO_Single_Sign_On_-OpenAM-OpenAMserversetup">
<title>OpenAM Server Setup</title>
<para>
- This section contains procedures that need to be followed to set up an OpenAM server for authentication against JBoss Portal Platform. The authentication set up by these procedures is ensured by the JBoss Portal Platform SSO Authentication Plugin. The plugin will be installed in OpenAM and configured to to perform authentication against the portal using a REST callback. <!-- TODO: add info about other means of authentication on OpenAM side that are mentioned in the Confluence doc -->
+ This section contains procedures that need to be followed to set up an OpenAM server for authentication against JBoss Portal Platform. The authentication set up by these procedures is ensured by the JBoss Portal Platform SSO Authentication Plugin. The plugin will be installed in OpenAM and configured to to perform authentication against the portal using a REST callback.
+ <note>
+ <para>
+ Using the REST callback as presented in this section is not mandatory. You can achieve authentication on the OpenAM side by any other means according to your preference.
+ </para>
+ </note>
</para>
<para>
To achieve the setup, perform the procedures in the following order:
@@ -1323,12 +1324,12 @@
<title>Adding the Authentication Plug-in</title>
<step>
<para>
- Copy the contents of the <code>GATEIN_SSO_HOME/opensso/plugin/</code> directory to <code>TOMCAT_HOME/webapps/opensso/</code>. <!-- TODO: correct location of source files, I can't find them in BETA, I can only see some of the files in the SRC package --> This will add:
+ Copy the contents of the <code>JPP_DIST/gatein-sso/opensso/plugin/</code> directory to <code>TOMCAT_HOME/webapps/opensso/</code>. This will add:
</para>
<itemizedlist>
<listitem>
<para>
- the <filename>AuthenticationPlugin.xml</filename> file <filename>TOMCAT_HOME/webapps/opensso/config/auth/default/</filename> directory. The file contains the following configuration:
+ the <filename>AuthenticationPlugin.xml</filename> file to the <filename>TOMCAT_HOME/webapps/opensso/config/auth/default/</filename> directory. The file contains the following configuration:
</para>
<informalexample>
<programlisting language="XML">
@@ -1354,12 +1355,12 @@
</listitem>
<listitem>
<para>
- <!-- TODO: obtain correct list of files --> the <filename>sso-opensso-plugin-<VERSION>.jar</filename> and <filename>commons-httpclient-<VERSION>.jar</filename> archives to the <filename>TOMCAT_HOME/webapps/opensso/WEB-INF/lib</filename> directory.
+ the <filename>sso-opensso-plugin-<VERSION>.jar</filename> and <filename>commons-httpclient-<VERSION>.jar</filename> archives to the <filename>TOMCAT_HOME/webapps/opensso/WEB-INF/lib</filename> directory.
</para>
</listitem>
<listitem>
<para>
- the <filename>gatein.properties</filename> file to the <filename>TOMCAT_HOME/webapps/opensso/WEB-INF/classes/</filename> directory. You may need to configure the host, port, protocol, and other properties in this file according to your JBoss Portal Platform location. These values will be used by the authentication plugin to establish the REST connection to the portal over the HTTP protocol.
+ the <filename>gatein.properties</filename> file to the <filename>TOMCAT_HOME/webapps/opensso/WEB-INF/classes/</filename> directory. You may need to change the values specified in this file to match the configuration of the JBoss Portal Platform instance. The values will be used by the authentication plugin to establish the REST connection to the portal.
</para>
</listitem>
</itemizedlist>
@@ -1435,7 +1436,7 @@
<section id="sect-Reference_Guide-SSO_Single_Sign_On_-OpenAM-SetuptheOpenAMclient">
<title>JBoss Portal Platform Setup as OpenAM Client</title>
<para>
- On the JBoss Portal Platform server, you need to ensure proper configuration of single sign-on properties in the <code>JPP_DIST/standalone/configuration/gatein/configuration.properties</code> file. Locate the SSO section in this file and change/add properties in the section as follows:
+ On the JBoss Portal Platform server, you need to ensure proper configuration of single sign-on properties in the <code>JPP_SERVER/standalone/configuration/gatein/configuration.properties</code> file. Locate the SSO section in this file and change/add properties in the section as follows:
</para>
<programlisting># SSO
gatein.sso.enabled=true
@@ -1868,7 +1869,7 @@
<title>Configuring SPNEGO Integration with JBoss Portal Platform</title>
<step>
<para>
- Modify the <literal># SSO</literal> section of the <filename><replaceable>JPP_DIST</replaceable>/standalone/configuration/gatein/configuration.properties</filename> file, replacing the original content with the following properties:
+ Modify the <literal># SSO</literal> section of the <filename><replaceable>JPP_SERVER</replaceable>/standalone/configuration/gatein/configuration.properties</filename> file, replacing the original content with the following properties:
</para>
<programlisting>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../../extras/Authentication_Identity_SSO/default124.xml" parse="text"/>
@@ -1912,7 +1913,7 @@
<term>gatein.sso.filter.login.sso.url</term>
<listitem>
<para>
- This value ensures that clicking the <guibutton>Sign in</guibutton> link will redirect users to the <literal>/portal/dologin</literal> URL, which is a secured URL declared in the <filename>security-constraint section of JPP_DIST/gatein/gatein.ear/portal.war/WEB-INF/web.xml</filename> file, allowing the <systemitem>GateInNegotiationAuthenticator</systemitem> valve to intercept the HTTP request.
+ This value ensures that clicking the <guibutton>Sign in</guibutton> link will redirect users to the <literal>/portal/dologin</literal> URL, which is a secured URL declared in the <filename>security-constraint section of JPP_SERVER/gatein/gatein.ear/portal.war/WEB-INF/web.xml</filename> file, allowing the <systemitem>GateInNegotiationAuthenticator</systemitem> valve to intercept the HTTP request.
</para>
</listitem>
</varlistentry>
@@ -1929,7 +1930,7 @@
<term>gatein.sso.valve.enabled</term>
<listitem>
<para>
- SPNEGO integration requires a custom Tomcat valve to intercept HTTP requests for secured URLs. The <systemitem>SSODelegateValve</systemitem> is defined in the <filename>JPP_DIST/gatein/gatein.ear/portal.war/WEB-INF/jboss-web.xml</filename> file and is used only if this option is set to <literal>true</literal>. The purpose of the valve is to delegate the real work to another valve declared in the <literal>gatein.sso.valve.class</literal> property. This eliminates the need to edit configuration in the <filename>jboss-web.xml</filename> file.
+ SPNEGO integration requires a custom Tomcat valve to intercept HTTP requests for secured URLs. The <systemitem>SSODelegateValve</systemitem> is defined in the <filename>JPP_SERVER/gatein/gatein.ear/portal.war/WEB-INF/jboss-web.xml</filename> file and is used only if this option is set to <literal>true</literal>. The purpose of the valve is to delegate the real work to another valve declared in the <literal>gatein.sso.valve.class</literal> property. This eliminates the need to edit configuration in the <filename>jboss-web.xml</filename> file.
</para>
</listitem>
</varlistentry>
@@ -1946,7 +1947,7 @@
</step>
<step>
<para>
- Modify configuration of the <systemitem>security</systemitem> subsystem in the <filename><replaceable>JPP_DIST</replaceable>/standalone/configuration/standalone.xml</filename> file:
+ Modify configuration of the <systemitem>security</systemitem> subsystem in the <filename><replaceable>JPP_SERVER</replaceable>/standalone/configuration/standalone.xml</filename> file:
</para>
<substeps>
<step>
@@ -2053,7 +2054,7 @@
As demonstrated in <xref linkend="proc-Reference_Guide-JBoss_Enterprise_Portal_Platform_Configuration-SPNEGO_Testing" />, users trying to sign in without a valid Kerberos ticket are automatically redirected to the JBoss Portal Platform logon page. There, they can perform standard FORM authentication using their user name and password.
</para>
<para>
- If you want to disable FORM authentication to allow only users with a valid Kerberos ticket to sign in, you need to comment out the <parameter>usernamePasswordDomain</parameter> option in the <literal>SPNEGOLoginModule</literal> configuration in the <filename><replaceable>JPP_DIST</replaceable>/standalone/configuration/standalone.xml</filename> file.
+ If you want to disable FORM authentication to allow only users with a valid Kerberos ticket to sign in, you need to comment out the <parameter>usernamePasswordDomain</parameter> option in the <literal>SPNEGOLoginModule</literal> configuration in the <filename><replaceable>JPP_SERVER</replaceable>/standalone/configuration/standalone.xml</filename> file.
</para>
<programlisting language="XML"><![CDATA[<login-module
code="org.gatein.sso.spnego.SPNEGOLoginModule" flag="requisite">
@@ -2067,7 +2068,7 @@
<section>
<title>Enabling Logging</title>
<para>
- To enable logging of events related to SPNEGO authentication, you can add the following entries to the <systemitem>logging</systemitem> subsystem in the <filename><replaceable>JPP_DIST</replaceable>/standalone/configuration/standalone.xml</filename> file:
+ To enable logging of events related to SPNEGO authentication, you can add the following entries to the <systemitem>logging</systemitem> subsystem in the <filename><replaceable>JPP_SERVER</replaceable>/standalone/configuration/standalone.xml</filename> file:
</para>
<programlisting language="XML"><![CDATA[<logger category="org.gatein.sso">
<level name="TRACE"/>
@@ -2105,7 +2106,7 @@
<title>Default Configuration</title>
<para>
- The JBoss SSO valve is enabled by default. The enablement is ensured by the following JBoss Web subsystem configuration entry in the <filename>JPP_DIST/standalone/configuration/standalon-ha.xml</filename> file:
+ The JBoss SSO valve is enabled by default. The enablement is ensured by the following JBoss Web subsystem configuration entry in the <filename>JPP_SERVER/standalone/configuration/standalon-ha.xml</filename> file:
</para>
<programlisting language="XML"><![CDATA[
<sso cache-container="web" cache-name="sso" reauthenticate="false" />
@@ -2147,7 +2148,7 @@
<step>
<para>
- On both servers, open the <filename><replaceable>JPP_DIST</replaceable>/standalone/configuration/standalone-ha.xml</filename> file. Add the <parameter>domain</parameter> parameter to the <parameter>sso</parameter> entry and specify the name of the shared DNS domain in its value.
+ On both servers, open the <filename><replaceable>JPP_SERVER</replaceable>/standalone/configuration/standalone-ha.xml</filename> file. Add the <parameter>domain</parameter> parameter to the <parameter>sso</parameter> entry and specify the name of the shared DNS domain in its value.
</para>
<programlisting language="XML"><![CDATA[
<sso cache-container="web" cache-name="sso" reauthenticate="false" domain="yourdomain.com"/>
11 years, 11 months
gatein SVN: r9032 - epp/docs/branches/5.2/User_Guide/en-US.
by do-not-reply@jboss.org
Author: rdickens
Date: 2013-01-02 23:58:33 -0500 (Wed, 02 Jan 2013)
New Revision: 9032
Modified:
epp/docs/branches/5.2/User_Guide/en-US/Revision_History.xml
Log:
Fixed year as the revisions were not in chronological order
Modified: epp/docs/branches/5.2/User_Guide/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/5.2/User_Guide/en-US/Revision_History.xml 2013-01-03 04:27:35 UTC (rev 9031)
+++ epp/docs/branches/5.2/User_Guide/en-US/Revision_History.xml 2013-01-03 04:58:33 UTC (rev 9032)
@@ -10,7 +10,7 @@
<revision>
<revnumber>5.2.2-105</revnumber>
- <date>Thu Jan 3 2012</date>
+ <date>Thu Jan 3 2013</date>
<author>
<firstname>Russell</firstname>
<surname>Dickenson</surname>
11 years, 11 months
gatein SVN: r9031 - epp/docs/branches/5.2/User_Guide/en-US.
by do-not-reply@jboss.org
Author: rdickens
Date: 2013-01-02 23:27:35 -0500 (Wed, 02 Jan 2013)
New Revision: 9031
Modified:
epp/docs/branches/5.2/User_Guide/en-US/Revision_History.xml
Log:
Bumped pubsnumber to get book re-Brew-ed
Modified: epp/docs/branches/5.2/User_Guide/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/5.2/User_Guide/en-US/Revision_History.xml 2013-01-03 04:17:05 UTC (rev 9030)
+++ epp/docs/branches/5.2/User_Guide/en-US/Revision_History.xml 2013-01-03 04:27:35 UTC (rev 9031)
@@ -9,6 +9,21 @@
<revhistory>
<revision>
+ <revnumber>5.2.2-105</revnumber>
+ <date>Thu Jan 3 2012</date>
+ <author>
+ <firstname>Russell</firstname>
+ <surname>Dickenson</surname>
+ <email/>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Minor edits of work done in BZ#849827.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+
+ <revision>
<revnumber>5.2.2-104</revnumber>
<date>Mon Nov 12 2012</date>
<author>
11 years, 11 months
gatein SVN: r9030 - epp/docs/branches/5.2/User_Guide/en-US/modules/portletsUser.
by do-not-reply@jboss.org
Author: rdickens
Date: 2013-01-02 23:17:05 -0500 (Wed, 02 Jan 2013)
New Revision: 9030
Modified:
epp/docs/branches/5.2/User_Guide/en-US/modules/portletsUser/Dashboard_Portlet.xml
Log:
Added admonition about valid and invalid characters in a dashboard's name
Modified: epp/docs/branches/5.2/User_Guide/en-US/modules/portletsUser/Dashboard_Portlet.xml
===================================================================
--- epp/docs/branches/5.2/User_Guide/en-US/modules/portletsUser/Dashboard_Portlet.xml 2013-01-03 01:29:57 UTC (rev 9029)
+++ epp/docs/branches/5.2/User_Guide/en-US/modules/portletsUser/Dashboard_Portlet.xml 2013-01-03 04:17:05 UTC (rev 9030)
@@ -19,6 +19,9 @@
<imagedata fileref="images/Dashname.png" format="PNG" align="center" scalefit="1" contentwidth="120mm"/>
</imageobject>
</mediaobject>
+ <note>
+ <para>A dashboard's name cannot start with a digit. Special characters, ">" for example, are valid but are replaced in the relevant URL with the underscore character: "_".</para>
+ </note>
<para>
...and entering a new name:
</para>
11 years, 11 months
gatein SVN: r9028 - in epp/portal/branches/EPP_5_2_Branch: component/portal/src/main/java/org/exoplatform/portal/mop/user and 1 other directories.
by do-not-reply@jboss.org
Author: mputz
Date: 2013-01-02 09:42:14 -0500 (Wed, 02 Jan 2013)
New Revision: 9028
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NodeContext.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeFilter.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeFilterConfig.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
Log:
Bug 851980 Prevent additional pages of the same navigation level being loaded
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NodeContext.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NodeContext.java 2013-01-02 14:33:25 UTC (rev 9027)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NodeContext.java 2013-01-02 14:42:14 UTC (rev 9028)
@@ -304,7 +304,7 @@
private void doFilter(int depth, NodeFilter filter)
{
- boolean accept = filter.accept(depth, getId(), name, getState());
+ boolean accept = filter.accept(depth, getId(), getName(), getState());
setHidden(!accept);
if (expanded)
{
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeFilter.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeFilter.java 2013-01-02 14:33:25 UTC (rev 9027)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeFilter.java 2013-01-02 14:42:14 UTC (rev 9028)
@@ -96,6 +96,10 @@
public boolean accept(int depth, String id, String name, NodeState state)
{
+ if (config.customFilter != null && !config.customFilter.accept(depth, id, name, state))
+ {
+ return false;
+ }
Visibility visibility = state.getVisibility();
// Correct null -> displayed
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeFilterConfig.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeFilterConfig.java 2013-01-02 14:33:25 UTC (rev 9027)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeFilterConfig.java 2013-01-02 14:42:14 UTC (rev 9028)
@@ -21,7 +21,7 @@
import org.exoplatform.commons.utils.Safe;
import org.exoplatform.portal.mop.Visibility;
-
+import org.exoplatform.portal.mop.navigation.NodeFilter;
import java.util.Collections;
import java.util.EnumSet;
import java.util.Set;
@@ -50,6 +50,9 @@
/** . */
final boolean temporalCheck;
+
+ /** . */
+ final NodeFilter customFilter;
public UserNodeFilterConfig(Builder builder)
{
@@ -62,6 +65,7 @@
this.visibility = Safe.unmodifiableSet(builder.withVisibility);
this.authorizationMode = builder.withAuthorizationMode;
this.temporalCheck = builder.withTemporalCheck;
+ this.customFilter = builder.withCustomFilter;
}
public Set<Visibility> getVisibility()
@@ -100,6 +104,9 @@
/** . */
private boolean withTemporalCheck;
+
+ /** . */
+ private NodeFilter withCustomFilter;
private Builder()
{
@@ -191,6 +198,12 @@
this.withAuthorizationMode = AUTH_NO_CHECK;
return this;
}
+
+ public Builder withCustomFilter(NodeFilter customFilter)
+ {
+ this.withCustomFilter = customFilter;
+ return this;
+ }
public UserNodeFilterConfig build()
{
Modified: epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2013-01-02 14:33:25 UTC (rev 9027)
+++ epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2013-01-02 14:42:14 UTC (rev 9028)
@@ -19,15 +19,19 @@
package org.exoplatform.portal.webui.page;
+import org.apache.commons.lang.StringUtils;
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.UserPortalConfig;
+import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.ModelObject;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.SiteType;
+import org.exoplatform.portal.mop.navigation.NodeFilter;
+import org.exoplatform.portal.mop.navigation.NodeState;
import org.exoplatform.portal.mop.user.UserNavigation;
import org.exoplatform.portal.mop.user.UserNode;
import org.exoplatform.portal.mop.user.UserNodeFilterConfig;
@@ -36,6 +40,7 @@
import org.exoplatform.portal.webui.portal.PageNodeEvent;
import org.exoplatform.portal.webui.portal.UIPortal;
import org.exoplatform.portal.webui.util.PortalDataMapper;
+import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
import org.exoplatform.web.application.ApplicationMessage;
@@ -64,11 +69,17 @@
UIPortalApplication uiPortalApp = event.getSource();
UIPortal showedUIPortal = uiPortalApp.getCurrentSite();
- UserNodeFilterConfig.Builder builder = UserNodeFilterConfig.builder();
- builder.withReadCheck();
+
PageNodeEvent<UIPortalApplication> pageNodeEvent = (PageNodeEvent<UIPortalApplication>)event;
String nodePath = pageNodeEvent.getTargetNodeUri();
+
+ UserNodeFilterConfig.Builder pathFilterBuild = UserNodeFilterConfig.builder();
+ pathFilterBuild.withReadCheck();
+ pathFilterBuild.withCustomFilter(new PathFilter(nodePath));
+
+ UserNodeFilterConfig.Builder defNodeBuild = UserNodeFilterConfig.builder();
+ defNodeBuild.withCustomFilter(new DefaultNodeFilter());
UserNode targetNode = null;
SiteKey siteKey = pageNodeEvent.getSiteKey();
@@ -77,13 +88,13 @@
UserNavigation navigation = userPortal.getNavigation(siteKey);
if (navigation != null)
{
- targetNode = userPortal.resolvePath(navigation, builder.build(), nodePath);
+ targetNode = userPortal.resolvePath(navigation, pathFilterBuild.build(), nodePath);
if (targetNode == null)
{
// If unauthenticated users have no permission on PORTAL node and URL is valid, they will be required to login
if (pcontext.getRemoteUser() == null && siteKey.getType().equals(SiteType.PORTAL))
{
- targetNode = userPortal.resolvePath(navigation, builder.withAuthMode(UserNodeFilterConfig.AUTH_NO_CHECK).build(), nodePath);
+ targetNode = userPortal.resolvePath(navigation, null, nodePath);
if (targetNode != null)
{
uiPortalApp.setLastRequestURI(null);
@@ -94,7 +105,7 @@
else
{
// If path to node is invalid, get the default node instead of.
- targetNode = userPortal.getDefaultPath(navigation, builder.build());
+ targetNode = userPortal.getDefaultPath(navigation, defNodeBuild.build());
}
}
}
@@ -102,7 +113,7 @@
if (targetNode == null)
{
- targetNode = userPortal.getDefaultPath(builder.build());
+ targetNode = userPortal.getDefaultPath(defNodeBuild.build());
if (targetNode == null)
{
if (showedUIPortal != null)
@@ -184,8 +195,84 @@
//Reset selected navigation on userPortalConfig
PortalDataMapper.toUIPortal(uiPortal, userPortalConfig.getPortalConfig());
return uiPortal;
+ }
+
+ private class PathFilter implements NodeFilter
+ {
+ private List<String> paths;
+
+ public PathFilter(String nodePath)
+ {
+ String[] tmp = StringUtils.split(nodePath, "/");
+
+ paths = new ArrayList<String>();
+ if (tmp != null)
+ {
+ for (String str : tmp)
+ {
+ if (str != null && !"".equals(str.trim()))
+ {
+ paths.add(str.trim());
+ }
+ }
+ }
+ }
+
+ @Override
+ public boolean accept(int depth, String id, String name, NodeState state)
+ {
+ return depth == 0 || (depth <= paths.size() && paths.get(depth -1).equals(name));
+ }
}
- }
+
+ private class DefaultNodeFilter implements NodeFilter
+ {
+ private boolean found;
+
+ @Override
+ public boolean accept(int depth, String id, String name, NodeState state)
+ {
+ if (depth == 0)
+ {
+ return true;
+ }
+ else
+ {
+ if (found)
+ {
+ return false;
+ }
+ else
+ {
+ found = hasPermission(state.getPageRef());
+ return found;
+ }
+ }
+ }
+
+ private boolean hasPermission(String pageRef)
+ {
+ UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
+ UserPortalConfigService service = uiPortalApp.getApplicationComponent(UserPortalConfigService.class);
+ if (pageRef != null)
+ {
+ try
+ {
+ Page page = service.getPage(pageRef);
+ if (page != null)
+ {
+ return service.getUserACL().hasPermission(page);
+ }
+ }
+ catch (Exception e) {}
+ }
+ return false;
+ }
+ }
+ }
+
+
+
static public class DeleteGadgetActionListener extends EventListener<UIPage>
{
11 years, 11 months