[jira] [Updated] (PLUTO-680) TCK: Contesting tests that reference Pluto-specific security roles

"Neil Griffin (JIRA)" <[email protected]>
Newsgroups gmane.comp.jakarta.pluto.devel
Message-ID <[email protected]>
     [ https://issues.apache.org/jira/browse/PLUTO-680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Neil Griffin updated PLUTO-680:
-------------------------------
    Description: 
TCK test cases
 * V2RequestTests_PortletRequest_ApiEvent_isUserInRole1
 * V2RequestTests_PortletRequest_ApiResource_isUserInRole1
 * V3HeaderPortletTests_SPEC14_PortletRequest_ApiHeader_isUserInRole1
 * AnnotationPortletConfigTests_SPEC2_28_SecurityRole

test the requirement "Method isUserInRole(): returns true if the authenticated user is in the specified role" as specified in Portlet Spec 3.0 Chapter 24.2, 24.3, and [JavaDoc|https://portals.apache.org/pluto/portlet-3.0-apidocs/javax/portlet/PortletRequest.html#isUserInRole(java.lang.String)].

The test cases perform the tests by doing the following check:
{code:java}
boolean usrole=portletReq.isUserInRole("pluto");

if(usrole==true) {
   tr46.setTcSuccess(true);
} else {
   tr46.appendTcDetail("The Authenticated user is not in Specified Role");
}
{code}
The problem is, the role used in the test case is Pluto specific, while other portal vendors may use complete different role names. For example, there's no role named "pluto" in Liferay, so the test cases fail in Liferay.

The proposed solution is to use a Maven profile that contains a property with a role name that is unique to each portal vendor.

  was:
TCK test cases
 * V2RequestTests_PortletRequest_ApiEvent_isUserInRole1
 * V2RequestTests_PortletRequest_ApiResource_isUserInRole1
 * V3HeaderPortletTests_SPEC14_PortletRequest_ApiHeader_isUserInRole1

test the requirement "Method isUserInRole(): returns true if the authenticated user is in the specified role" as specified in Portlet Spec 3.0 Chapter 24.2, 24.3, and [JavaDoc|https://portals.apache.org/pluto/portlet-3.0-apidocs/javax/portlet/PortletRequest.html#isUserInRole(java.lang.String)].

The test cases perform the tests by doing the following check:
{code:java}
boolean usrole=portletReq.isUserInRole("pluto");

if(usrole==true) {
   tr46.setTcSuccess(true);
} else {
   tr46.appendTcDetail("The Authenticated user is not in Specified Role");
}
{code}
The problem is, the role used in the test case is Pluto specific, while other portal vendors may use complete different role names. For example, there's no role named "pluto" in Liferay, so the test cases fail in Liferay.

The proposed solution is to use a Maven profile that contains a property with a role name that is unique to each portal vendor.


> TCK: Contesting tests that reference Pluto-specific security roles
> ------------------------------------------------------------------
>
>                 Key: PLUTO-680
>                 URL: https://issues.apache.org/jira/browse/PLUTO-680
>             Project: Pluto
>          Issue Type: Bug
>          Components: tck
>    Affects Versions: 3.0.0
>            Reporter: Dante Wang
>            Assignee: Neil Griffin
>            Priority: Major
>             Fix For: 3.0.1
>
>
> TCK test cases
>  * V2RequestTests_PortletRequest_ApiEvent_isUserInRole1
>  * V2RequestTests_PortletRequest_ApiResource_isUserInRole1
>  * V3HeaderPortletTests_SPEC14_PortletRequest_ApiHeader_isUserInRole1
>  * AnnotationPortletConfigTests_SPEC2_28_SecurityRole
> test the requirement "Method isUserInRole(): returns true if the authenticated user is in the specified role" as specified in Portlet Spec 3.0 Chapter 24.2, 24.3, and [JavaDoc|https://portals.apache.org/pluto/portlet-3.0-apidocs/javax/portlet/PortletRequest.html#isUserInRole(java.lang.String)].
> The test cases perform the tests by doing the following check:
> {code:java}
> boolean usrole=portletReq.isUserInRole("pluto");
> if(usrole==true) {
>    tr46.setTcSuccess(true);
> } else {
>    tr46.appendTcDetail("The Authenticated user is not in Specified Role");
> }
> {code}
> The problem is, the role used in the test case is Pluto specific, while other portal vendors may use complete different role names. For example, there's no role named "pluto" in Liferay, so the test cases fail in Liferay.
> The proposed solution is to use a Maven profile that contains a property with a role name that is unique to each portal vendor.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.