[opencms-dev] Access right trouble in component template
Mario Jäger
m.jaeger at alkacon.com
Thu Mar 11 10:05:41 CET 2010
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
More information about the opencms-dev
mailing list