[opencms-dev] Access right trouble in component template

Sébastien Bianco s.bianco at eurelis.com
Thu Mar 11 10:34:17 CET 2010


Hi Mario,

Thanks to have a look on my problem.

Here is the VFS Structure :

/sites/default/fr/_data/etude_marketing/

I got 2 objects :
- juridic_1 of type juridic (exactly ffc_basic_juridic)
- study_1 of type study (exactly ffc_basic_study)

Both are pointing on document : /sites/default/fr/_data/etude_marketing/documents_complets/CP_DubaI_Oct2009.pdf


Here are permissions on /fr	

Group users group (Users) (+r+w+v)
Role Root administrator (+r+w+v+c+d)

Idem on:
- /fr/_data 
- /fr/_data/etude_marketing/
- /fr/_data/etude_marketing/study_1
- /fr/_data/etude_marketing/juridic_1

Here are rights on /fr/_data/etude_marketing/documents_complets/
users group (Users) (+r+w+v)
Role Root administrator (+r+w+v+c+d)
Group guests group (Guests) (-v)
	

Here are rights on /fr/_data/etude_marketing/documents_complets/CP_DubaI_Oct2009.pdf (inherited of parent folder)
Group guests group (Guests) (-v)	
Group users group (Users) (+r+w+v)
Role Root administrator (+r+w+v+c+d)
---------------------------------------------
Here is control code of juridic elements

<?xml version="1.0" encoding="UTF-8"?>

<FFCJuridics xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="opencms://system/modules/com.ffc.opencms.website/schemas/contents/juridic_ffc.xsd">
  <FFCJuridic language="fr">
    <Document>
      <link type="WEAK">
        <target><![CDATA[/sites/default/fr/_data/etude_marketing/documents_complets/CP_DubaI_Oct2009.pdf]]></target>
        <uuid>9ea52782-073c-11df-8e50-090e3f73715e</uuid>
      </link>
    </Document>
  </FFCJuridic>
</FFCJuridics>


----------------------------------------

Here is control code of study element:

<?xml version="1.0" encoding="UTF-8"?>

<FFCStudys xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="opencms://system/modules/com.ffc.opencms.website/schemas/contents/study_ffc.xsd">
  <FFCStudy language="fr">
    <Title><![CDATA[mon title]]></Title>
    <SortedDate>1268316660000</SortedDate>
    <Summary name="Summary0">
      <links/>
      <content><![CDATA[toto]]></content>
    </Summary>
    <Document>
      <link type="WEAK">
        <target><![CDATA[/sites/default/fr/_data/etude_marketing/documents_complets/CP_DubaI_Oct2009.pdf]]></target>
        <uuid>9ea52782-073c-11df-8e50-090e3f73715e</uuid>
      </link>
    </Document>
  </FFCStudy>
</FFCStudys>
 




Sébastien BIANCO

Ingénieur développement

 EURELIS

 AGITATEUR DE TECHNOLOGIES

Tel : +33 (0)1 49 97 20 20

Fax : +33 (0)1 47 68 20 19

 

-----Message d'origine-----
De : opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] De la part de Mario Jäger
Envoyé : jeudi 11 mars 2010 10:06
À : The OpenCms mailing list
Objet : Re: [opencms-dev] Access right trouble in component template

Hi Sébastien,

I have compared your two documents "juridic" and "study". They are identical except for some 
comment lines. Give us more details of your VFS structure and the permissions, please.

-- 
Kind Regards,
Mario.
 
-------------------
Mario Jäger
 
Alkacon Software GmbH  - The OpenCms Experts                    
http://www.alkacon.com - http://www.opencms.org


Sébastien Bianco schrieb:
>
> Hello,
>
> I've got a strange behaviour in template with document with private 
> rights. In one case, with my first template, I can see the document, 
> not in the second case L
>
> _Here is the context:_
>
> I design two data structures (xml-content) - juridic and study - both 
> having a link to VFS file (Document) (cf attached file containing the 
> xml content description)
>
> I created instances of theses objects, with Document pointing to a 
> same file (private for guest ó Deny view for guest set on folder 
> containing this file)
>
> Here are the template I wrote for both object:
>
> *_juridics_*
>
> <%@ page session="true" import="java.util.*, 
> java.text.*,org.opencms.db.*,java.util.regex.*,org.opencms.util.*, 
> org.opencms.util.*,org.opencms.i18n.*"%>
>
> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
>
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
>
> <%@ taglib prefix="eurelis" 
> uri="http://www.eurelis.com/taglib/opencms/commons" %>
>
> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
>
> <%-- ## Get if the user is connected or not ## --%>
>
> <jsp:useBean id="cms" 
> class="com.eurelis.opencms.commons.frontend.CmsCommonsBean">
>
> <% cms.init(pageContext, request, response); %>
>
> </jsp:useBean>
>
> <c:if test="${empty param.uri_object}">
>
> <c:set var="the_object">${cms:vfs(pageContext).requestContext.uri}</c:set>
>
> </c:if>
>
> <c:if test="${!empty param.uri_object}">
>
> <c:set var="the_object">${param.uri_object}</c:set>
>
> </c:if>
>
> <c:set 
> var="locale">${cms:vfs(pageContext).propertySearch[the_object]['locale']}</c:set>
>
> <c:if test="${empty locale}"><c:set var="locale">en</c:set></c:if>
>
> <c:set var="editablemode">
>
> <c:if test="${!empty param.editablemode}">${param.editablemode}</c:if>
>
> <c:if test="${empty param.editablemode}">true</c:if>
>
> </c:set>
>
> <cms:contentload collector="singleFile" param="${the_object}" 
> editable="${editablemode}">
>
> <cms:contentaccess var="xmlRsc" />
>
> <%-- ## Get the document to download ## --%>
>
> Document : ${xmlRsc.value['Document']}
>
> </cms:contentload>
>
> *_study_*
>
> <%@ page session="true" import="java.util.*, 
> java.text.*,org.opencms.db.*,java.util.regex.*,org.opencms.util.*, 
> org.opencms.util.*,org.opencms.i18n.*"%>
>
> <%@ taglib prefix="cms" uri="http://www.opencms.org/taglib/cms" %>
>
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
>
> <%@ taglib prefix="eurelis" 
> uri="http://www.eurelis.com/taglib/opencms/commons" %>
>
> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
>
> <jsp:useBean id="cms" 
> class="com.eurelis.opencms.commons.frontend.CmsCommonsBean">
>
> <% cms.init(pageContext, request, response); %>
>
> </jsp:useBean>
>
> <c:if test="${empty param.uri_object}">
>
> <c:set var="the_object">${cms:vfs(pageContext).requestContext.uri}</c:set>
>
> </c:if>
>
> <c:if test="${!empty param.uri_object}">
>
> <c:set var="the_object">${param.uri_object}</c:set>
>
> </c:if>
>
> <c:set 
> var="locale">${cms:vfs(pageContext).propertySearch[the_object]['locale']}</c:set>
>
> <c:if test="${empty locale}"><c:set var="locale">en</c:set></c:if>
>
> <c:set var="editablemode">
>
> <c:if test="${!empty param.editablemode}">${param.editablemode}</c:if>
>
> <c:if test="${empty param.editablemode}">true</c:if>
>
> </c:set>
>
> <cms:contentload collector="singleFile" param="${the_object}" 
> editable="${editablemode}">
>
> <cms:contentaccess var="xmlRsc" />
>
> Document : ${xmlRsc.value['Document']}
>
> </cms:contentload>
>
> Here are the result I got when seeing the document as a guest :
>
> *_juridics_*
>
> Document : 
> /fr/_data/etude_marketing/documents_complets/CP_DubaI_Oct2009.pdf
>
> *_study_*
>
> Document :
>
> The behaviour seams correct for study: the user cannot see the 
> document, so OpenCms filter the link to the document
>
> Does anybody understand why there is such a difference in behaviour 
> although I linked the same file (so with the same access rights!)
>
> NB : I've no problem with document without any access restriction.
>
> Thanks for any kind of help !
>
> **Sébastien BIANCO**
>
> **Ingénieur développement**
>
> ** **
>
> **EURELIS**
>
> ** AGITATEUR DE TECHNOLOGIES**
>
> **Tel : +33 (0)1 49 97 20 20**
>
> **Fax : +33 (0)1 47 68 20 19**
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev



More information about the opencms-dev mailing list