portlet role mapping
"Hansenne, Rami (EXT)" <[email protected]> Fri, 27 Mar 2009 16:12:20 +0100
| Newsgroups | gmane.comp.cms.jahia.devel |
|---|---|
| Message-ID | <90A077A6F635EE42A7308C4D625CD3F0047DDD0F@BRU0037A.ww018.siemens.net> |
This is a multi-part message in MIME format.
--===============0456560406==
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C9AEEE.74E7C91F"
This is a multi-part message in MIME format.
------_=_NextPart_001_01C9AEEE.74E7C91F
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Hi,
=20
I am currently testing portlet integration on Jahia 6. Specifically I
need to map Jahia groups to portlet roles.
=20
I have:
=20
- defined the roles in my portlet's web.xml file, e.g.:
<security-role>
<role-name>role1</role-name>
</security-role>
- mapped the roles (with identical names) in the portlet.xml file, e.g.:
<security-role-ref>
<role-name>role1</role-name>
<role-link>role1</role-link>
</security-role-ref>
- deployed the portlet webapp and used the mashup manager to map a Jahia
group to the portlet role
- added the portlet to a container on a page
The portlet displays and executes correctly, however the following
always returns null, although the logged in user is in fact a member of
the mapped group:
request.isUserInRole("role1")
I was wondering whether I am doing something wrong or whether this is
still an unresolved issue in Jahia 6?
Best regards,
Rami
------_=_NextPart_001_01C9AEEE.74E7C91F
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii">
<META content=3D"MSHTML 6.00.2900.3492" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D679020515-27032009>Hi,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D679020515-27032009></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D679020515-27032009>I am =
currently=20
testing portlet integration on Jahia 6. </SPAN></FONT><FONT face=3DArial =
size=3D2><SPAN class=3D679020515-27032009>Specifically I need to map =
Jahia groups to=20
portlet roles.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D679020515-27032009></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D679020515-27032009>I=20
have:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D679020515-27032009></SPAN></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D679020515-27032009>- =
defined the roles=20
in my portlet's <U>web.xml</U> file, e.g.:</SPAN></FONT></DIV>
<DIV><SPAN class=3D679020515-27032009>
<P align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#008080><</FONT><FONT=20
color=3D#3f7f7f>security-role</FONT></FONT></FONT><FONT =
face=3DArial><FONT=20
size=3D2><FONT color=3D#008080>><BR><SPAN=20
class=3D679020515-27032009> </SPAN></FONT><FONT=20
color=3D#008080><</FONT><FONT color=3D#3f7f7f>role-name</FONT><FONT=20
color=3D#008080>><SPAN =
class=3D679020515-27032009>role1</SPAN></</FONT><FONT=20
color=3D#3f7f7f>role-name</FONT></FONT></FONT><FONT size=3D2><FONT =
face=3DArial=20
color=3D#008080>><BR></FONT><FONT face=3DArial><FONT=20
color=3D#008080></</FONT><FONT =
color=3D#3f7f7f>security-role</FONT><FONT=20
color=3D#008080>></FONT></FONT></FONT></P>
<P align=3Dleft><FONT size=3D2><FONT face=3DArial><FONT =
color=3D#008080><SPAN=20
class=3D679020515-27032009><FONT color=3D#000000>- mapped the roles =
(with identical=20
names) in the <U>portlet.xml</U> file,=20
e.g.:</FONT></SPAN></FONT></FONT></FONT></P><FONT color=3D#008080><SPAN=20
class=3D679020515-27032009><FONT color=3D#000000>
<P align=3Dleft><FONT face=3DArial><FONT size=3D2><FONT =
color=3D#008080><</FONT><FONT=20
color=3D#3f7f7f>security-role-ref</FONT></FONT></FONT><FONT =
size=3D2><FONT=20
face=3DArial><FONT color=3D#008080>><BR><SPAN=20
class=3D679020515-27032009> </SPAN></FONT></FONT><FONT =
face=3DArial><FONT color=3D#008080><</FONT><FONT=20
color=3D#3f7f7f>role-name</FONT><FONT color=3D#008080>><SPAN=20
class=3D679020515-27032009>role1</SPAN></</FONT><FONT=20
color=3D#3f7f7f>role-name</FONT></FONT></FONT><FONT face=3DArial><FONT =
size=3D2><FONT=20
color=3D#008080>><BR><SPAN =
class=3D679020515-27032009> =20
</SPAN><</FONT><FONT color=3D#3f7f7f>role-link</FONT><FONT=20
color=3D#008080>><SPAN=20
class=3D679020515-27032009>role1</SPAN></</FONT></FONT></FONT><FONT=20
color=3D#3f7f7f><FONT face=3DArial size=3D2>role-link</FONT><SPAN=20
class=3D679020515-27032009><FONT face=3DArial=20
size=3D2>><BR></FONT></SPAN></FONT><FONT face=3DArial><FONT =
size=3D2><FONT=20
color=3D#008080></</FONT><FONT =
color=3D#3f7f7f>security-role-ref</FONT><FONT=20
color=3D#008080>></P></FONT></FONT></FONT></FONT></SPAN></FONT>
<P align=3Dleft><FONT size=3D2><FONT face=3DArial><FONT =
color=3D#008080><SPAN=20
class=3D679020515-27032009><FONT color=3D#000000>- deployed the portlet =
webapp and=20
used the <U>mashup manager</U> to <U>map</U> a Jahia group to the =
portlet=20
role</FONT></SPAN></FONT></FONT></FONT></P>
<P align=3Dleft><FONT size=3D2><FONT face=3DArial><FONT =
color=3D#008080><SPAN=20
class=3D679020515-27032009><FONT color=3D#000000>- added the portlet to =
a container=20
on a page</FONT></SPAN></FONT></FONT></FONT></P>
<P align=3Dleft><FONT size=3D2><FONT face=3DArial><FONT =
color=3D#008080><SPAN=20
class=3D679020515-27032009><FONT color=3D#000000>The portlet displays =
and executes=20
correctly, however the following always returns null, although the =
logged in=20
user is in fact a member of the mapped=20
group:</FONT></SPAN></FONT></FONT></FONT></P><FONT color=3D#008080><SPAN =
class=3D679020515-27032009>
<P><FONT face=3DArial color=3D#000000 =
size=3D2>request.isUserInRole(<SPAN=20
class=3D679020515-27032009>"</SPAN>role<SPAN=20
class=3D679020515-27032009>1"</SPAN>)</FONT></P>
<P><SPAN class=3D679020515-27032009><FONT face=3DArial color=3D#000000 =
size=3D2>I was=20
wondering whether I am doing something wrong or whether this is still an =
unresolved issue in Jahia 6?</FONT></SPAN></P>
<P><SPAN class=3D679020515-27032009><FONT face=3DArial color=3D#000000 =
size=3D2>Best=20
regards,</FONT></SPAN></P>
<P><SPAN class=3D679020515-27032009><FONT face=3DArial color=3D#000000=20
size=3D2>Rami</FONT></SPAN></P></SPAN></FONT></SPAN></DIV></BODY></HTML>
------_=_NextPart_001_01C9AEEE.74E7C91F--
--===============0456560406==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
dev_list mailing list
[email protected]
http://lists.jahia.org/cgi-bin/mailman/listinfo/dev_list
--===============0456560406==--