You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by as...@apache.org on 2018/01/15 21:03:21 UTC

portals-pluto git commit: PLUTO-680 TCK: Contestng V2RequestTests_PortletRequest_ApiEvent_isUserInRole1

Repository: portals-pluto
Updated Branches:
  refs/heads/master 847890616 -> 6f7653251


PLUTO-680 TCK: Contestng V2RequestTests_PortletRequest_ApiEvent_isUserInRole1


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/6f765325
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/6f765325
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/6f765325

Branch: refs/heads/master
Commit: 6f76532516a391233b21d8b192883db4333422d0
Parents: 8478906
Author: Neil Griffin <ne...@gmail.com>
Authored: Mon Jan 15 15:01:06 2018 -0500
Committer: Neil Griffin <ne...@gmail.com>
Committed: Mon Jan 15 15:01:06 2018 -0500

----------------------------------------------------------------------
 portlet-tck_3.0/V2RequestTests/pom.xml                          | 3 +++
 .../portlets/RequestTests_PortletRequest_ApiEvent_event.java    | 2 +-
 .../tck/portlets/RequestTests_PortletRequest_ApiResource.java   | 2 +-
 portlet-tck_3.0/V2RequestTests/src/main/webapp/WEB-INF/web.xml  | 5 +++++
 4 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/6f765325/portlet-tck_3.0/V2RequestTests/pom.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2RequestTests/pom.xml b/portlet-tck_3.0/V2RequestTests/pom.xml
index aeac26a..36f9181 100644
--- a/portlet-tck_3.0/V2RequestTests/pom.xml
+++ b/portlet-tck_3.0/V2RequestTests/pom.xml
@@ -85,6 +85,8 @@
       <!-- This module places the portlets on the page through a file. (Page is not generated from the portlet.xml) -->
       <additional.pagefile.only>true</additional.pagefile.only>
 
+      <portal.security.role>pluto</portal.security.role>
+
       <portletrequest.context.path>/tck-V2RequestTests</portletrequest.context.path>
    </properties>
 
@@ -116,6 +118,7 @@
       <profile>
          <id>liferay</id>
          <properties>
+            <portal.security.role>User</portal.security.role>
             <portletrequest.context.path>/o/tck-V2RequestTests</portletrequest.context.path>
          </properties>
       </profile>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/6f765325/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_PortletRequest_ApiEvent_event.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_PortletRequest_ApiEvent_event.java b/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_PortletRequest_ApiEvent_event.java
index 8e43232..bd64c3a 100644
--- a/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_PortletRequest_ApiEvent_event.java
+++ b/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_PortletRequest_ApiEvent_event.java
@@ -696,7 +696,7 @@ public class RequestTests_PortletRequest_ApiEvent_event implements Portlet, Even
       /* Details: "Method isUserInRole(): Returns true if the authenticated   */
       /* user is in the specified role"                                       */
       TestResult tr46 = tcd.getTestResultFailed(V2REQUESTTESTS_PORTLETREQUEST_APIEVENT_ISUSERINROLE1);
-      boolean usrole=portletReq.isUserInRole("pluto");
+      boolean usrole=portletReq.isUserInRole(pc.getInitParameter("javax.portlet.portal.SECURITY_ROLE"));
       if(usrole==true) {
     	  tr46.setTcSuccess(true);
       } else {

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/6f765325/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_PortletRequest_ApiResource.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_PortletRequest_ApiResource.java b/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_PortletRequest_ApiResource.java
index 4de95dd..f93aa03 100644
--- a/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_PortletRequest_ApiResource.java
+++ b/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_PortletRequest_ApiResource.java
@@ -697,7 +697,7 @@ public class RequestTests_PortletRequest_ApiResource implements Portlet, Resourc
       /* Details: "Method isUserInRole(): Returns true if the authenticated   */
       /* user is in the specified role"                                       */
       TestResult tr46 = tcd.getTestResultFailed(V2REQUESTTESTS_PORTLETREQUEST_APIRESOURCE_ISUSERINROLE1);
-      boolean usrole=portletReq.isUserInRole("pluto");
+      boolean usrole=portletReq.isUserInRole(pc.getInitParameter("javax.portlet.portal.SECURITY_ROLE"));
       if(usrole==true) {
     	  tr46.setTcSuccess(true);
       } else {

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/6f765325/portlet-tck_3.0/V2RequestTests/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2RequestTests/src/main/webapp/WEB-INF/web.xml b/portlet-tck_3.0/V2RequestTests/src/main/webapp/WEB-INF/web.xml
index fcc9331..531fbcc 100644
--- a/portlet-tck_3.0/V2RequestTests/src/main/webapp/WEB-INF/web.xml
+++ b/portlet-tck_3.0/V2RequestTests/src/main/webapp/WEB-INF/web.xml
@@ -21,6 +21,11 @@
    <display-name>javax.portlet-tck-RequestTests</display-name>
 
    <context-param>
+      <param-name>javax.portlet.portal.SECURITY_ROLE</param-name>
+      <param-value>${portal.security.role}</param-value>
+   </context-param>
+
+   <context-param>
       <param-name>javax.portlet.portletrequest.CONTEXT_PATH</param-name>
       <param-value>${portletrequest.context.path}</param-value>
    </context-param>