Role Based Admin Change ---------------------------- I am thinking that a web server admin tool my not have just one admin that controls everything but there maybe be other less powerful admins with limited control. For example there may be admins that control properties for a certain subset of webapps. In this case the less powerful admins should be only be allowed to see what they have access to. Thus the user's tree of configurable and readable objects should be built according to their priviledges or roles. In this case, the tree controller cannot be built in the session listener code because the user has not logged in yet at that point. I have moved the code for the tree building to a new file SetUpTreeAction.java which gets called from index.jsp after the user has logged in.
SetUpTreeAction.java builds the root node and then gets the init parameters set in web.xml of a classes that implement the TreeBuilder interface. That way anyone can input nodes into the tree in the implementation of the method buildTree() of the interface. One of the parameters of the of the buildTree method is the request so the user can do a getUserPrincipal() to do role checks. Attached are the cvs diffs of the existing files and the added files SetUpTreeAction.java and TreeBuilder.java The new files should be checked into the following directory: $TOMCAT_HOME/jakarta-tomcat-4.0/webapps/admin/WEB-INF/classes/org/apache/webapp/admin Also we should probably get rid of TreeControlTestListener.java Jazmin -- __________________________________________________________________ Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/ Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
cvsdiff
Description: cvsdiff
TreeBuilder.java
Description: TreeBuilder.java
SetUpTreeAction.java
Description: SetUpTreeAction.java
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
