Update of /var/cvs/applications/vpro-wizards/tagfiles/form
In directory
james.mmbase.org:/tmp/cvs-serv4660/applications/vpro-wizards/tagfiles/form
Modified Files:
container.tag
Log Message:
authorization check added
See also: http://cvs.mmbase.org/viewcvs/applications/vpro-wizards/tagfiles/form
Index: container.tag
===================================================================
RCS file: /var/cvs/applications/vpro-wizards/tagfiles/form/container.tag,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- container.tag 12 Nov 2008 14:52:56 -0000 1.1
+++ container.tag 7 Apr 2009 10:44:16 -0000 1.2
@@ -15,12 +15,15 @@
<%-- set the default fields --%>
<c:set var="action" scope="request">Node</c:set>
+<c:set var="authorized" value="false" scope="request"/>
<c:choose>
<c:when test="${empty nodenr}">
<c:set var="modifier" scope="request">create</c:set>
+ <mm:maycreate type="${nodetype}"><c:set var="authorized" value="true"
scope="request"/></mm:maycreate>
</c:when>
<c:otherwise>
<c:set var="modifier" scope="request">update</c:set>
+ <mm:maywrite number="${nodenr}"><c:set var="authorized"
value="true" scope="request"/></mm:maywrite>
</c:otherwise>
</c:choose>
@@ -42,6 +45,8 @@
<c:set var="enctype"><c:if test="${multipart == true || not empty
requestScope.filefield}">enctype="multipart/form-data"</c:if></c:set>
<c:remove var="requestScope.filefield" />
+ <c:choose>
+ <c:when test="${authorized == 'true'}">
<form method="post" ${enctype}
action="${pageContext.request.contextPath}/wizard/post" id="formcontainer">
<%--set the default fields for this action in the form--%>
@@ -92,4 +97,14 @@
</script>
</c:if>
</form>
+ </c:when>
+ <c:otherwise>
+ <h3>Verboden</h3>
+ <p>Je hebt geen rechten om
+ <c:choose>
+ <c:when test="${modifier == 'create'}">een object van type
${nodetype} aan te maken.</c:when>
+ <c:otherwise>dit object te bewerken.</c:otherwise>
+ </c:choose>
+ </c:otherwise>
+ </c:choose>
</div>
\ No newline at end of file
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs