Changeset 320

Show
Ignore:
Timestamp:
04/03/06 00:22:34
Author:
douglm
Message:

Partial changes to make current access to objects visible at application level. Currently only calendars and that not complete.

New tag to emit current access as xml.

Fixes to webclient to sort out exceptions and also display public rather than personal calendars.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/access/src/edu/rpi/cct/uwcal/access/Access.java

    r314 r320  
    5555 
    5656import java.io.Serializable; 
     57 
     58import edu.rpi.cct.uwcal.access.Acl.CurrentAccess; 
    5759 
    5860/** Class to handle access control. Because we may be evaluating access  
     
    184186   * @param how      Privilege set definign desired access 
    185187   * @param aclString String defining current acls for object 
    186    * @return boolean allowed/disallowed 
    187    * @throws AccessException 
    188    */ 
    189   public boolean evaluateAccess(AccessPrincipal who, String owner, 
    190                                 Privilege[] how, String aclString) 
     188   * @return CurrentAccess   access + allowed/disallowed 
     189   * @throws AccessException 
     190   */ 
     191  public CurrentAccess evaluateAccess(AccessPrincipal who, String owner, 
     192                                      Privilege[] how, String aclString) 
    191193          throws AccessException { 
    192194    return new Acl(debug).evaluateAccess(who, owner, how, aclString.toCharArray()); 
     
    199201   * @param how      Privilege set defining desired access 
    200202   * @param aclChars char[] defining current acls for object 
    201    * @return boolean allowed/disallowed 
    202    * @throws AccessException 
    203    */ 
    204   public boolean evaluateAccess(AccessPrincipal who, String owner, 
    205                                 Privilege[] how, char[] aclChars) 
     203   * @return CurrentAccess   access + allowed/disallowed 
     204   * @throws AccessException 
     205   */ 
     206  public CurrentAccess evaluateAccess(AccessPrincipal who, String owner, 
     207                                      Privilege[] how, char[] aclChars) 
    206208          throws AccessException { 
    207209    return new Acl(debug).evaluateAccess(who, owner, how, aclChars); 
     
    213215   * @param owner    String owner of object 
    214216   * @param aclChars char[] defining current acls for object 
    215    * @return boolean allowed/disallowed 
    216    * @throws AccessException 
    217    */ 
    218   public boolean checkRead(AccessPrincipal who, String owner, 
    219                            char[] aclChars) 
     217   * @return CurrentAccess   access + allowed/disallowed 
     218   * @throws AccessException 
     219   */ 
     220  public CurrentAccess checkRead(AccessPrincipal who, String owner, 
     221                                 char[] aclChars) 
    220222          throws AccessException { 
    221223    return new Acl(debug).evaluateAccess(who, owner, privSetRead, aclChars); 
     
    227229   * @param owner    String owner of object 
    228230   * @param aclChars char[] defining current acls for object 
    229    * @return boolean allowed/disallowed 
    230    * @throws AccessException 
    231    */ 
    232   public boolean checkReadWrite(AccessPrincipal who, String owner, 
    233                                 char[] aclChars) 
     231   * @return CurrentAccess   access + allowed/disallowed 
     232   * @throws AccessException 
     233   */ 
     234  public CurrentAccess checkReadWrite(AccessPrincipal who, String owner, 
     235                                      char[] aclChars) 
    234236          throws AccessException { 
    235237    return new Acl(debug).evaluateAccess(who, owner, privSetReadWrite, aclChars); 
     
    242244   * @param priv     int desired access as defined above 
    243245   * @param aclChars char[] defining current acls for object 
    244    * @return boolean allowed/disallowed 
    245    * @throws AccessException 
    246    */ 
    247   public boolean evaluateAccess(AccessPrincipal who, String owner, 
    248                                 int priv, char[] aclChars) 
     246   * @return CurrentAccess   access + allowed/disallowed 
     247   * @throws AccessException 
     248   */ 
     249  public CurrentAccess evaluateAccess(AccessPrincipal who, String owner, 
     250                                      int priv, char[] aclChars) 
    249251          throws AccessException { 
    250252    return new Acl(debug).evaluateAccess(who, owner, 
  • trunk/calendar3/access/src/edu/rpi/cct/uwcal/access/Acl.java

    r314 r320  
    119119    aces = null; 
    120120  } 
     121   
     122  /** Result of evaluating access to an object for a principal 
     123   */ 
     124  public static class CurrentAccess { 
     125    /**  Allowed access for each privilege type  
     126     * @see PrivilegeDefs 
     127     */ 
     128    public char[] privileges = null; 
     129 
     130    /** Privileges desired */ 
     131    public Privilege[] desiredAccess; 
     132 
     133    /** Was it succesful */ 
     134    public boolean accessAllowed; 
     135  } 
    121136 
    122137  /** Evaluating an ACL 
     
    152167   * @param how 
    153168   * @param acl 
    154    * @return boolean true for access allowed 
    155    * @throws AccessException 
    156    */ 
    157   public synchronized boolean evaluateAccess(AccessPrincipal who, String owner, 
    158                                              Privilege[] how, char[] acl) 
     169   * @return CurrentAccess   access + allowed/disallowed 
     170   * @throws AccessException 
     171   */ 
     172  public CurrentAccess evaluateAccess(AccessPrincipal who, String owner, 
     173                                      Privilege[] how, char[] acl) 
    159174          throws AccessException { 
    160175    boolean authenticated = !who.getUnauthenticated(); 
    161176    boolean isOwner = false; 
    162     char[] privileges = null; 
     177    CurrentAccess ca = new CurrentAccess(); 
     178    ca.desiredAccess = how; 
    163179 
    164180    setEncoded(acl); 
     
    182198      if (!authenticated) { 
    183199        if (ace.decode(this, false, null, Ace.whoTypeUnauthenticated)) { 
    184           privileges = ace.getHow(); 
     200          ca.privileges = ace.getHow(); 
    185201        } 
    186202 
     
    190206      if (isOwner) { 
    191207        if (ace.decode(this, false, null, Ace.whoTypeOwner)) { 
    192           privileges = ace.getHow(); 
     208          ca.privileges = ace.getHow(); 
    193209        } else { 
    194           privileges = defaultOwnerPrivileges; 
     210          ca.privileges = defaultOwnerPrivileges; 
    195211        } 
    196212 
     
    200216      // Not owner - look for user 
    201217      if (ace.decode(this, false, who.getAccount(), Ace.whoTypeUser)) { 
    202         privileges = ace.getHow(); 
     218        ca.privileges = ace.getHow(); 
    203219        if (debug) { 
    204           debugsb.append("... For user got: " + new String(privileges)); 
     220          debugsb.append("... For user got: " + new String(ca.privileges)); 
    205221        } 
    206222 
     
    219235          } 
    220236          if (ace.decode(this, false, group, Ace.whoTypeGroup)) { 
    221             privileges = mergePrivileges(privileges, ace.getHow()); 
     237            ca.privileges = mergePrivileges(ca.privileges, ace.getHow()); 
    222238          } 
    223239        } 
    224240      } 
    225241 
    226       if (privileges != null) { 
     242      if (ca.privileges != null) { 
    227243        if (debug) { 
    228           debugsb.append("...For groups got: " + new String(privileges)); 
     244          debugsb.append("...For groups got: " + new String(ca.privileges)); 
    229245        } 
    230246 
     
    234250      // "other" access set? 
    235251      if (ace.decode(this, false, null, Ace.whoTypeOther)) { 
    236         privileges = ace.getHow(); 
     252        ca.privileges = ace.getHow(); 
    237253 
    238254        if (debug) { 
    239           debugsb.append("...For other got: " + new String(privileges)); 
     255          debugsb.append("...For other got: " + new String(ca.privileges)); 
    240256        } 
    241257 
     
    244260    } // getPrivileges 
    245261 
    246     if (privileges == null) { 
     262    if (ca.privileges == null) { 
    247263      if (debug) { 
    248264        debugMsg(debugsb.toString() + "...Check access denied (noprivs)"); 
    249265      } 
    250       return false; 
    251     } 
    252  
     266      return ca; 
     267    } 
     268 
     269    ca.privileges = (char[])ca.privileges.clone(); 
     270    for (int pi = 0; pi < ca.privileges.length; pi++) { 
     271      if (ca.privileges[pi] == unspecified) { 
     272        if (isOwner) { 
     273          ca.privileges[pi] = allowed; 
     274        } else { 
     275          ca.privileges[pi] = denied; 
     276        } 
     277      } 
     278    } 
     279     
    253280    for (int i = 0; i < how.length; i++) { 
    254       char priv = privileges[how[i].getIndex()]; 
    255       if (priv == unspecified) { 
    256         if (isOwner) { 
    257           priv = allowed; 
    258         } else { 
    259           priv = denied; 
    260         } 
    261       } 
     281      char priv = ca.privileges[how[i].getIndex()]; 
     282 
    262283      if (priv != allowed) { 
    263284        if (debug) { 
    264285          debugMsg(debugsb.toString() + "...Check access denied (!allowed)"); 
    265286        } 
    266         return false
     287        return ca
    267288      } 
    268289    } 
     
    272293    } 
    273294 
    274     return true; 
     295    ca.accessAllowed = true; 
     296    return ca; 
    275297  } 
    276298 
  • trunk/calendar3/access/src/edu/rpi/cct/uwcal/access/PrivilegeDefs.java

    r2 r320  
    7676  public static final char unspecified = '1'; 
    7777 
     78  // ENUM 
    7879  /** Define a privilege type index 
    7980   */ 
  • trunk/calendar3/appcommon/src/org/bedework/appcommon/AccessAppUtil.java

    r318 r320  
    6161import edu.rpi.cct.uwcal.access.Acl; 
    6262import edu.rpi.cct.uwcal.access.Privilege; 
     63import edu.rpi.cct.uwcal.access.PrivilegeDefs; 
    6364import edu.rpi.cct.uwcal.access.Privileges; 
    6465import edu.rpi.sss.util.xml.QName; 
     
    7576 *  @author Mike Douglass   douglm @ rpi.edu 
    7677 */ 
    77 public class AccessUtil implements Serializable { 
     78public class AccessAppUtil implements Serializable { 
    7879  public static final QName[] privTags = { 
    7980    WebdavTags.all,              // privAll = 0; 
     
    9899   * @param xml 
    99100   */ 
    100   public AccessUtil(XmlEmit xml) { 
     101  public AccessAppUtil(XmlEmit xml) { 
    101102    this.xml = xml; 
    102103  } 
    103104   
    104   public static String getXmlString(Acl acl) throws CalFacadeException { 
     105  public static String getXmlAclString(Acl acl) throws CalFacadeException { 
    105106    try { 
    106107      XmlEmit xml = new XmlEmit(true);  // no headers 
    107108      StringWriter su = new StringWriter(); 
    108109      xml.startEmit(su); 
    109       AccessUtil au = new AccessUtil(xml); 
     110      AccessAppUtil au = new AccessAppUtil(xml); 
    110111       
    111112      au.emitAcl(acl); 
     
    197198    } 
    198199  } 
     200   
     201  /** Produce an xml representation of current user privileges from an array 
     202   * of allowed/disallowed/unspecified flags indexed by a privilege index. 
     203   *  
     204   * @param privs    char[] of allowed/disallowed 
     205   * @throws CalFacadeException 
     206   */ 
     207  public void emitCurrentPrivSet(char[] privileges) throws CalFacadeException { 
     208    try { 
     209      xml.openTag(WebdavTags.currentUserPrivilegeSet); 
     210       
     211      for (int pi = 0; pi < privileges.length; pi++) { 
     212        if (privileges[pi] == PrivilegeDefs.allowed) { 
     213          // XXX further work - don't emit abstract privs or contained privs. 
     214          QName pr = privTags[pi]; 
     215           
     216          if (pr != null) { 
     217            xml.propertyTagVal(WebdavTags.privilege, pr); 
     218          } 
     219        } 
     220      } 
     221       
     222      xml.closeTag(WebdavTags.currentUserPrivilegeSet); 
     223    } catch (Throwable t) { 
     224      throw new CalFacadeException(t); 
     225    } 
     226  } 
     227   
     228  /** Produce an xml representation of current user privileges from an array 
     229   * of allowed/disallowed/unspecified flags indexed by a privilege index, 
     230   * returning the representation a a String 
     231   *  
     232   * @param privs    char[] of allowed/disallowed 
     233   * @return String xml  
     234   * @throws CalFacadeException 
     235   */ 
     236  public static String getCurrentPrivSetString(char[] privileges)  
     237          throws CalFacadeException { 
     238    try { 
     239      XmlEmit xml = new XmlEmit(true);  // no headers 
     240      StringWriter su = new StringWriter(); 
     241      xml.startEmit(su); 
     242      AccessAppUtil au = new AccessAppUtil(xml); 
     243       
     244      au.emitCurrentPrivSet(privileges); 
     245       
     246      su.close(); 
     247       
     248      return su.toString(); 
     249    } catch (CalFacadeException cfe) { 
     250      throw cfe; 
     251    } catch (Throwable t) { 
     252      throw new CalFacadeException(t); 
     253    } 
     254  } 
     255 
     256  /* ==================================================================== 
     257   *                   Private methods 
     258   * ==================================================================== */ 
    199259 
    200260  private void emitSupportedPriv(Privilege priv) throws Throwable { 
  • trunk/calendar3/appcommon/src/org/bedework/appcommon/EventFormatter.java

    r314 r320  
    211211      if (xmlAccess == null) { 
    212212        Acl acl = svci.getAcl(getEvent()); 
    213         xmlAccess = AccessUtil.getXmlString(acl); 
     213        xmlAccess = AccessAppUtil.getXmlAclString(acl); 
    214214      } 
    215215    } catch (Throwable t) { 
  • trunk/calendar3/calCore/src/org/bedework/calcore/hibernate/AccessUtil.java

    r314 r320  
    5858import edu.rpi.cct.uwcal.access.Acl; 
    5959import edu.rpi.cct.uwcal.access.PrivilegeDefs; 
     60import edu.rpi.cct.uwcal.access.Acl.CurrentAccess; 
    6061 
    6162import org.bedework.calfacade.base.BwShareableContainedDbentity; 
     
    236237  boolean accessible(BwShareableDbentity ent, int desiredAccess, 
    237238                    boolean nullForNoAccess) throws CalFacadeException { 
     239    return checkAccess(ent, desiredAccess, nullForNoAccess).accessAllowed; 
     240  } 
     241 
     242  /* Check access for the given entity. Returns the current access 
     243   */ 
     244  CurrentAccess checkAccess(BwShareableDbentity ent, int desiredAccess, 
     245                      boolean nullForNoAccess) throws CalFacadeException { 
    238246    if (ent == null) { 
    239       return false
     247      return new CurrentAccess()
    240248    } 
    241249 
    242250    if ((authUser != null) && superUser) { 
    243251      // Nobody can stop us - BWAAA HAA HAA 
    244       return true; 
     252      CurrentAccess ca = new CurrentAccess(); 
     253      ca.accessAllowed = true; 
     254       
     255      return ca; 
    245256    } 
    246257 
     
    254265    char[] aclChars = getAclChars((BwShareableDbentity)ent); 
    255266 
    256     if (checkAccess(aclChars, ent.getOwner(), desiredAccess, 
    257                     nullForNoAccess)) { 
    258       return true; 
    259     } 
    260  
    261     return false; 
     267    return checkAccess(aclChars, ent.getOwner(), desiredAccess, 
     268                    nullForNoAccess); 
    262269  } 
    263270 
     
    310317   * @param returnResult  if true we return false for no access else throw 
    311318   *                    an exception 
    312    */ 
    313   private boolean checkAccess(char[] aclChars, BwUser owner, int desiredAccess, 
     319   * @return CurrentAccess   access + allowed/disallowed 
     320   */ 
     321  private CurrentAccess checkAccess(char[] aclChars, BwUser owner, int desiredAccess, 
    314322                              boolean returnResult) throws CalFacadeException { 
    315323 
    316     boolean allowed; 
    317  
    318     try { 
     324    try { 
     325      CurrentAccess ca; 
    319326      if (desiredAccess == privRead) { 
    320         allowed = access.checkRead(authUser, owner.getAccount(), 
     327        ca = access.checkRead(authUser, owner.getAccount(), 
     328                              aclChars); 
     329      } else if (desiredAccess == privWrite) { 
     330        ca = access.checkReadWrite(authUser, owner.getAccount(), 
    321331                                   aclChars); 
    322       } else if (desiredAccess == privWrite) { 
    323         allowed = access.checkReadWrite(authUser, owner.getAccount(), 
    324                                         aclChars); 
    325332      } else { 
    326333        /* Do it the awkward way */ 
    327         allowed = access.evaluateAccess(authUser, owner.getAccount(), 
    328                                         desiredAccess, aclChars); 
    329       } 
    330  
    331       if (!allowed) { 
    332         if (returnResult) { 
    333           return false; 
    334         } 
     334        ca = access.evaluateAccess(authUser, owner.getAccount(), 
     335                                   desiredAccess, aclChars); 
     336      } 
     337 
     338      if (!ca.accessAllowed && !returnResult) { 
    335339        throw new CalFacadeAccessException(); 
    336340      } 
    337341 
    338       return true
     342      return ca
    339343    } catch (CalFacadeException cfe) { 
    340344      throw cfe; 
  • trunk/calendar3/calCore/src/org/bedework/calcore/hibernate/Calendars.java

    r301 r320  
    6060import org.bedework.calfacade.CalFacadeException; 
    6161 
     62import edu.rpi.cct.uwcal.access.Acl.CurrentAccess; 
     63 
    6264import java.util.Collection; 
    6365import java.util.Iterator; 
     
    421423  private BwCalendar cloneAndCheckOne(BwCalendar subroot, int desiredAccess, 
    422424                           boolean nullForNoAccess) throws CalFacadeException { 
    423     if (!access.accessible(subroot, desiredAccess, nullForNoAccess)) { 
     425    CurrentAccess ca = access.checkAccess(subroot, desiredAccess,  
     426                                          nullForNoAccess); 
     427     
     428    if (!ca.accessAllowed) { 
    424429      return null; 
    425430    } 
     
    428433    // XXX Temp fix - add id to the clone 
    429434    cal.setId(subroot.getId()); 
     435     
     436    cal.setCurrentAccess(ca); 
    430437 
    431438    Iterator it = subroot.iterateChildren(); 
  • trunk/calendar3/calFacade/src/org/bedework/calfacade/BwCalendar.java

    r249 r320  
    5656import org.bedework.calfacade.base.BwShareableContainedDbentity; 
    5757 
     58import edu.rpi.cct.uwcal.access.Acl.CurrentAccess; 
     59 
    5860import java.net.URLEncoder; 
    5961import java.util.Collection; 
     
    100102  /** The children of this calendar */ 
    101103  private Collection children; 
     104   
     105  /* This field must only be used for cloned copies of an entity as it is  
     106   * specific to a current thread. 
     107   */ 
     108  private CurrentAccess currentAccess; 
    102109 
    103110  /** Constructor 
     
    264271 
    265272  /* ==================================================================== 
     273   *                   Transient object methods 
     274   * ==================================================================== */ 
     275 
     276  public void setCurrentAccess(CurrentAccess val) { 
     277    currentAccess = val; 
     278  } 
     279 
     280  public CurrentAccess getCurrentAccess() { 
     281    return currentAccess; 
     282  } 
     283 
     284  /* ==================================================================== 
    266285   *                   Convenience methods 
    267286   * ==================================================================== */ 
  • trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/CaldavBWIntf.java

    r314 r320  
    5454package edu.rpi.cct.uwcal.caldav; 
    5555 
    56 import org.bedework.appcommon.AccessUtil; 
     56import org.bedework.appcommon.AccessAppUtil; 
    5757import org.bedework.calfacade.BwCalendar; 
    5858import org.bedework.calfacade.BwEvent; 
     
    782782    findPriv: { 
    783783      // ENUM 
    784       for (priv = 0; priv < AccessUtil.privTags.length; priv++) { 
    785         if (MethodBase.nodeMatches(el, AccessUtil.privTags[priv])) { 
     784      for (priv = 0; priv < AccessAppUtil.privTags.length; priv++) { 
     785        if (MethodBase.nodeMatches(el, AccessAppUtil.privTags[priv])) { 
    786786          break findPriv; 
    787787        } 
  • trunk/calendar3/caldav/src/edu/rpi/cct/uwcal/caldav/EmitAccess.java

    r310 r320  
    5454package edu.rpi.cct.uwcal.caldav; 
    5555 
    56 import org.bedework.appcommon.AccessUtil; 
     56import org.bedework.appcommon.AccessAppUtil; 
    5757import edu.rpi.sss.util.xml.XmlEmit; 
    5858 
     
    6161 * 
    6262 */ 
    63 public class EmitAccess extends AccessUtil { 
     63public class EmitAccess extends AccessAppUtil { 
    6464  private String namespacePrefix; 
    6565   
  • trunk/calendar3/lib/tlds/bedework.tld

    r312 r320  
    5353    </attribute> 
    5454  </tag> 
     55 
     56  <tag> 
     57    <name>emitCurrentPrivs</name> 
     58    <tagclass>org.bedework.webcommon.taglib.EmitCurrentPrivsTag</tagclass> 
     59    <bodycontent>empty</bodycontent> 
     60    <info>Emit txt in a tag</info> 
     61 
     62    <attribute> 
     63      <name>name</name> 
     64      <required>true</required> 
     65      <rtexprvalue>false</rtexprvalue> 
     66    </attribute> 
     67 
     68    <attribute> 
     69      <name>property</name> 
     70      <required>false</required> 
     71      <rtexprvalue>false</rtexprvalue> 
     72    </attribute> 
     73 
     74    <attribute> 
     75      <name>scope</name> 
     76      <required>false</required> 
     77      <rtexprvalue>false</rtexprvalue> 
     78    </attribute> 
     79 
     80    <attribute> 
     81      <name>tagName</name> 
     82      <required>false</required> 
     83      <rtexprvalue>false</rtexprvalue> 
     84    </attribute> 
     85  </tag> 
    5586</taglib> 
    5687 
  • trunk/calendar3/test/src/org/bedework/tests/access/AccessTest.java

    r314 r320  
    6363import edu.rpi.cct.uwcal.access.Privilege; 
    6464import edu.rpi.cct.uwcal.access.Privileges; 
     65import edu.rpi.cct.uwcal.access.Acl.CurrentAccess; 
    6566 
    6667import junit.framework.TestCase; 
     
    7374public class AccessTest extends TestCase { 
    7475  boolean debug = true; 
    75  
    76   Acl acl = new Acl(debug); 
    7776 
    7877  /** 
     
    10099 
    101100      /* See what we get when we encode a null - that's default - acl. */ 
     101 
     102      Acl acl = new Acl(debug); 
    102103 
    103104      char[] encoded = logEncoded(acl, "default encoded"); 
     
    154155                                 Privilege[] how,char[] encoded, 
    155156                                 boolean expected, String title) throws Throwable { 
    156     boolean allowed = acl.evaluateAccess(who, owner.getAccount(), how, encoded); 
     157    CurrentAccess ca = new Acl().evaluateAccess(who, owner.getAccount(), how, encoded); 
    157158 
    158159    if (debug) { 
    159       log(title + " got " + allowed + " and expected " + expected); 
     160      log(title + " got " + ca.accessAllowed + " and expected " + expected); 
    160161    } 
    161     assertEquals(title, expected, allowed); 
     162    assertEquals(title, expected, ca.accessAllowed); 
    162163  } 
    163164 
  • trunk/calendar3/webclient/war/WEB-INF/struts-config.xml

    r319 r320  
    434434    <action    path="/subs/fetch" 
    435435               type="org.bedework.webcommon.subs.GetSubscriptionsAction" 
    436                name="peForm" 
     436               name="calForm" 
    437437               scope="session" 
    438438               validate="false"> 
     
    442442    <action    path="/subs/fetchForUpdate" 
    443443               type="org.bedework.webcommon.subs.FetchSubscriptionAction" 
    444                name="peForm" 
     444               name="calForm" 
    445445               scope="session" 
    446446               validate="false"> 
     
    451451    <action    path="/subs/initAdd" 
    452452               type="org.bedework.webcommon.subs.InitSubscribeAction" 
    453                name="peForm" 
     453               name="calForm" 
    454454               scope="session" 
    455455               validate="false"> 
     
    461461    <action    path="/subs/subscribe" 
    462462               type="org.bedework.webcommon.subs.SubscribeAction" 
    463                name="peForm" 
     463               name="calForm" 
    464464               scope="session" 
    465465               validate="false"> 
     
    472472    <action    path="/subs/unsubscribe" 
    473473               type="org.bedework.webcommon.subs.UnsubscribeAction" 
    474                name="peForm" 
     474               name="calForm" 
    475475               scope="session" 
    476476               validate="false"> 
  • trunk/calendar3/webclient/war/docs/calendar/emitCalendar.jsp

    r319 r320  
    11<%@ taglib uri='struts-bean' prefix='bean' %> 
    22<%@ taglib uri='struts-logic' prefix='logic' %> 
     3<%@ taglib uri='bedework' prefix='bw' %> 
    34 
    45<calendar> 
    56  <id><bean:write name="calendar" property="id" /></id> 
    6   <name><bean:write name="calendar" property="name" /></name
    7   <path><bean:write name="calendar" property="path" /></path
    8   <desc><bean:write name="calendar" property="description" /></desc
     7  <bw:emitText name="calendar" property="name" /
     8  <bw:emitText name="calendar" property="path" /
     9  <bw:emitText name="calendar" property="description" tagName="desc" /
    910  <calendarCollection><bean:write name="calendar" property="calendarCollection" /></calendarCollection> 
    10   <mailListId><bean:write name="calendar" property="mailListId" /></mailListId> 
     11  <bw:emitText name="calendar" property="mailListId" /> 
     12  <bw:emitCurrentPrivs name="calendar" property="currentAccess" /> 
    1113 
    1214  <logic:iterate name="calendar" property="children" id="cal"> 
  • trunk/calendar3/webclient/war/docs/subs/subscriptions.jsp

    r319 r320  
    11<%@ taglib uri='struts-bean' prefix='bean' %> 
    22<%@ taglib uri='struts-logic' prefix='logic' %> 
     3<%@ taglib uri='bedework' prefix='bw' %> 
    34 
    45<%@include file="/docs/header.jsp"%> 
     6 
     7<% 
     8try { 
     9%> 
    510 
    611<page>subscriptions</page> 
     
    914  <logic:iterate name="calForm" property="subscriptions" id="subscription"> 
    1015    <subscription> 
    11       <name><bean:write name="subscription" property="name" /></name
    12       <uri><bean:write name="subscription" property="uri" /></uri
     16      <bw:emitText name="subscription" property="name" /
     17      <bw:emitText name="subscription" property="uri" /
    1318      <affectsFreeBusy><bean:write name="subscription" property="affectsFreeBusy" /></affectsFreeBusy> 
    1419      <display><bean:write name="subscription" property="display" /></display> 
    15       <style><bean:write name="subscription" property="style" /></style
     20      <bw:emitText name="subscription" property="style" /
    1621      <internal><bean:write name="subscription" property="internalSubscription" /></internal> 
    1722      <emailNotifications><bean:write name="subscription" property="emailNotifications" /></emailNotifications> 
     
    2328  <subscribe> 
    2429    <!-- List of calendars to subscribe to--> 
    25     <%@include file="/docs/calendar/emitCalendars.jsp"%> 
     30    <%@include file="/docs/calendar/emitPublicCalendars.jsp"%> 
    2631  </subscribe> 
    2732</subscriptions> 
    2833 
     34<% 
     35} catch (Throwable t) { 
     36  t.printStackTrace(); 
     37} 
     38%> 
     39 
    2940 
    3041<%@include file="/docs/footer.jsp"%> 
  • trunk/calendar3/webcommon/build.xml

    r312 r320  
    3636      <pathelement location="${ical4j.jar}"/> 
    3737 
     38      <pathelement location="${org.bedework.access.jar}"/> 
    3839      <pathelement location="${org.bedework.common.jar}"/> 
    3940      <pathelement location="${org.bedework.calenv.jar}"/> 
  • trunk/calendar3/webcommon/src/org/bedework/webcommon/taglib/EmitTextTag.java

    r312 r320  
    9393  public int doEndTag() throws JspTagException { 
    9494    try { 
    95       /* Try to retrieve the path from category */ 
    96  
    9795      /* Try to retrieve the value */ 
    9896      String val = getString(false);