some work on the ACLs to improve their editability, creation of the ACL helper,

creation of the first conferencing permissions, and the use of those
permissions in the first conference display
This commit is contained in:
Eric J. Bowersox
2003-06-25 07:46:20 +00:00
parent 8b40695626
commit db492cf185
15 changed files with 556 additions and 123 deletions

View File

@@ -30,4 +30,17 @@ comm = vlib.getCommunity(req); // get community
// Create the view.
rc = new VelocityView("Conference List: " + comm.name,"conf/conferences.vm");
rc.setParameter("community",comm);
// Can we manage the conference list?
perm_namespace = "http://www.silverwrist.com/NS/venice/2003/06/25/conferencing.permissions";
srm = cast.querySecurityReferenceMonitor(req_help.getRequestObject(Namespaces.DYNAMO_OBJECT_NAMESPACE,"srm"));
acl1 = comm.getAcl();
acl2 = srm.getGlobalAcl();
if (acl1.testPermission(user,perm_namespace,"manage.order") || acl2.testPermission(user,perm_namespace,"manage.order"))
rc.setParameter("can_manage",Boolean.TRUE);
// Can we create new conferences?
if (acl1.testPermission(user,perm_namespace,"create") || acl2.testPermission(user,perm_namespace,"create"))
rc.setParameter("can_create",Boolean.TRUE);
dynamo.scriptOutput(rc);

View File

@@ -17,7 +17,9 @@
*#
#*
Parameters:
community = The community we're getting the conferences of.
community = The community we're getting the conferences of.
can_manage = Set if we can manage the ordering of conferences.
can_create = Set if we can create new conferences.
*#
#header2( "Conference List:" $community.Name )
## TEMPORARY
@@ -25,3 +27,16 @@
magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
## END TEMPORARY
<div align="left">
#set( $cid = $community.getCID() )
<a href="#formatURL( "SERVLET" "conf/TODO.js.vs?cc=${cid}" )">#button( "IMAGE" "find" )</a>
#if( $can_manage )
&nbsp;&nbsp;
<a href="#formatURL( "SERVLET" "conf/TODO.js.vs?cc=${cid}" )">#button( "IMAGE" "manage" )</a>
#end
#if( $can_create )
&nbsp;&nbsp;
<a href="#formatURL( "SERVLET" "conf/TODO.js.vs?cc=${cid}" )">#button( "IMAGE" "create.new" )</a>
#end
</div>