JBoss Portal SVN: r12437 - in modules/identity/trunk: sso and 1 other directory.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2009-01-07 04:39:26 -0500 (Wed, 07 Jan 2009)
New Revision: 12437
Modified:
modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPConnectionContext.java
modules/identity/trunk/sso/build.xml
Log:
JBPORTAL-2272 anonymous access in ldap
Modified: modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPConnectionContext.java
===================================================================
--- modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPConnectionContext.java 2009-01-07 03:43:24 UTC (rev 12436)
+++ modules/identity/trunk/identity/src/main/java/org/jboss/portal/identity/ldap/LDAPConnectionContext.java 2009-01-07 09:39:26 UTC (rev 12437)
@@ -97,8 +97,10 @@
env.put(Context.INITIAL_CONTEXT_FACTORY, this.getContextFactory());
env.put(Context.PROVIDER_URL, "ldap://" + getHost() + ":" + getPort());
env.put(Context.SECURITY_AUTHENTICATION, this.getAuthentication());
- env.put(Context.SECURITY_PRINCIPAL, this.getAdminDN());
- env.put(Context.SECURITY_CREDENTIALS, this.getAdminPassword());
+ if (this.getAdminDN() != null)
+ env.put(Context.SECURITY_PRINCIPAL, this.getAdminDN());
+ if (this.getAdminPassword() != null)
+ env.put(Context.SECURITY_CREDENTIALS, this.getAdminPassword());
if (this.getProtocol() != null)
{
Modified: modules/identity/trunk/sso/build.xml
===================================================================
--- modules/identity/trunk/sso/build.xml 2009-01-07 03:43:24 UTC (rev 12436)
+++ modules/identity/trunk/sso/build.xml 2009-01-07 09:39:26 UTC (rev 12437)
@@ -36,7 +36,7 @@
It also deploys any custom configuration/dependencies into the CAS war file which is the
CAS Authentication Server
-
+
Note: The CAS engine does not accept self-signed SSL certificates. This requirement
is fine for production use where a production level SSL certificate is available.
However, for testing purposes, this can get a little annoying. Hence, if you are having this issue,
17 years, 3 months
JBoss Portal SVN: r12436 - branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-01-06 22:43:24 -0500 (Tue, 06 Jan 2009)
New Revision: 12436
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp
Log:
JBPORTAL-2266 - CMS JBPM Workflow affected by the JBPM Value Serialization Bug
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp 2009-01-07 03:32:12 UTC (rev 12435)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp 2009-01-07 03:43:24 UTC (rev 12436)
@@ -99,13 +99,15 @@
{
pendingPreviewContent = "";
}
+ String sDocBase = (String)request.getAttribute("document_base_url");
%>
+
+<%if(sDocBase != null){%>
<%
String pid = request.getParameter("pid");
String path = request.getParameter("path");
- String sDocBase = (String)request.getAttribute("document_base_url");
String sCSSURL = (String)request.getAttribute("css_url");
- contentBeingPreviewed = pid;
+ contentBeingPreviewed = pid;
%>
<!-- tinyMCE -->
<script language="javascript" type="text/javascript"
@@ -179,6 +181,9 @@
</table>
</form>
</div>
+<%}%>
+
+
<br/></br>
17 years, 3 months
JBoss Portal SVN: r12435 - branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-01-06 22:32:12 -0500 (Tue, 06 Jan 2009)
New Revision: 12435
Modified:
branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp
Log:
JBPORTAL-2266 - CMS JBPM Workflow affected by the JBPM Value Serialization Bug
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp 2009-01-07 03:22:13 UTC (rev 12434)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/pending_items.jsp 2009-01-07 03:32:12 UTC (rev 12435)
@@ -99,13 +99,15 @@
{
pendingPreviewContent = "";
}
+ String sDocBase = (String)request.getAttribute("document_base_url");
%>
+
+<%if(sDocBase != null){%>
<%
String pid = request.getParameter("pid");
String path = request.getParameter("path");
- String sDocBase = (String)request.getAttribute("document_base_url");
String sCSSURL = (String)request.getAttribute("css_url");
- contentBeingPreviewed = pid;
+ contentBeingPreviewed = pid;
%>
<!-- tinyMCE -->
<script language="javascript" type="text/javascript"
@@ -179,6 +181,9 @@
</table>
</form>
</div>
+<%}%>
+
+
<br/></br>
17 years, 3 months
JBoss Portal SVN: r12434 - modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-01-06 22:22:13 -0500 (Tue, 06 Jan 2009)
New Revision: 12434
Modified:
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow/ApprovePublishImpl.java
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow/CMSWorkflowUtil.java
modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow/FinalizePublish.java
Log:
JBPORTAL-2266 - CMS JBPM Workflow affected by the JBPM Value Serialization Bug
Modified: modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow/ApprovePublishImpl.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow/ApprovePublishImpl.java 2009-01-06 20:19:30 UTC (rev 12433)
+++ modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow/ApprovePublishImpl.java 2009-01-07 03:22:13 UTC (rev 12434)
@@ -524,7 +524,7 @@
//iterate through a list of currently pending approval tasks
if (!processInstance.hasEnded())
{
- Content content = (Content)processInstance.getContextInstance().getVariable("content");
+ Content content = this.getContent(processInstance);
//apply proper criteria to extract pending content only for the specified file
if (content != null)
@@ -542,6 +542,11 @@
}
}
}
+ catch(Exception e)
+ {
+ log.error(this, e);
+ throw new WorkflowException(e);
+ }
finally
{
IOTools.safeClose(jbpmContext);
@@ -576,7 +581,7 @@
//iterate through a list of currently pending approval tasks
if (!processInstance.hasEnded())
{
- Content content = (Content)processInstance.getContextInstance().getVariable("content");
+ Content content = this.getContent(processInstance);
//apply proper criteria to extract pending content only for the specified file
if (content != null)
@@ -588,6 +593,11 @@
}
}
}
+ catch(Exception e)
+ {
+ log.error(this, e);
+ throw new WorkflowException(e);
+ }
finally
{
IOTools.safeClose(jbpmContext);
@@ -631,4 +641,14 @@
return isManager;
}
+
+ private Content getContent(ProcessInstance processInstance) throws Exception
+ {
+ Content content = null;
+
+ Object object = processInstance.getContextInstance().getVariable("content");
+ content = CMSWorkflowUtil.deserializeContent(object);
+
+ return content;
+ }
}
Modified: modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow/CMSWorkflowUtil.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow/CMSWorkflowUtil.java 2009-01-06 20:19:30 UTC (rev 12433)
+++ modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow/CMSWorkflowUtil.java 2009-01-07 03:22:13 UTC (rev 12434)
@@ -22,6 +22,8 @@
******************************************************************************/
package org.jboss.portal.cms.workflow;
+import java.io.ByteArrayInputStream;
+import java.io.ObjectInputStream;
import java.util.List;
import java.util.Locale;
@@ -36,6 +38,7 @@
import org.jboss.portal.cms.model.Content;
import org.jboss.portal.cms.model.File;
import org.jboss.portal.cms.impl.interceptors.ACLInterceptor;
+import org.jbpm.bytes.ByteArray;
/**
* @author Sohil Shah - sshah(a)redhat.com
@@ -129,4 +132,23 @@
}
return cms;
}
+
+ public static org.jboss.portal.cms.workflow.Content deserializeContent(Object object) throws Exception
+ {
+ org.jboss.portal.cms.workflow.Content content = null;
+
+ if(object instanceof ByteArray)
+ {
+ //JBPM bug workaround: https://jira.jboss.org/jira/browse/JBPM-1914
+ byte[] objectBytes = ((ByteArray)object).getBytes();
+
+ content = (org.jboss.portal.cms.workflow.Content)(new ObjectInputStream(new ByteArrayInputStream(objectBytes))).readObject();
+ }
+ else if(object instanceof org.jboss.portal.cms.workflow.Content)
+ {
+ content = (org.jboss.portal.cms.workflow.Content)object;
+ }
+
+ return content;
+ }
}
Modified: modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow/FinalizePublish.java
===================================================================
--- modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow/FinalizePublish.java 2009-01-06 20:19:30 UTC (rev 12433)
+++ modules/cms/trunk/cms-jackrabbit/src/main/java/org/jboss/portal/cms/workflow/FinalizePublish.java 2009-01-07 03:22:13 UTC (rev 12434)
@@ -52,7 +52,7 @@
*/
public void execute(ExecutionContext executionContext)
{
- Content content = (Content)executionContext.getContextInstance().getVariable("content");
+ Content content = this.readContent(executionContext);
boolean approved = ((Boolean)executionContext.getContextInstance().getVariable("approved")).booleanValue();
byte[] modifiedContent = (byte[])executionContext.getContextInstance().getVariable("modifiedContent");
long processId = executionContext.getProcessInstance().getId();
@@ -187,4 +187,21 @@
throw new RuntimeException(e);
}
}
+
+ private Content readContent(ExecutionContext executionContext)
+ {
+ try
+ {
+ Content content = null;
+
+ Object object = executionContext.getContextInstance().getVariable("content");
+ content = CMSWorkflowUtil.deserializeContent(object);
+
+ return content;
+ }
+ catch(Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ }
}
17 years, 3 months