Changeset 64

Show
Ignore:
Timestamp:
02/02/06 10:27:32
Author:
douglm
Message:

Moved property
org.bedework.syspar.directory.browsing.disallowed

back to
org.bedework.global.directory.browsing.disallowed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/calCore/resources/hbms/System.hbm.xml

    r54 r64  
    3131    <property name="publicUser" column="public_user" type="text" /> 
    3232 
    33     <property name="directoryBrowsingDisallowed" type="true_false" > 
    34       <column name="directory_browsing_disallowed" not-null="true" /> 
    35     </property> 
    36  
    3733    <property name="httpConnectionsPerUser" column="http_connections_per_user" type="integer" /> 
    3834    <property name="httpConnectionsPerHost" column="http_connections_per_host" type="integer" /> 
  • trunk/calendar3/calFacade/src/org/bedework/calfacade/BwSystem.java

    r59 r64  
    8686  private String publicUser; 
    8787 
    88   private boolean directoryBrowsingDisallowed; 
    89  
    9088  private int httpConnectionsPerUser; 
    9189  private int httpConnectionsPerHost; 
     
    225223  /** Get the userCalendar 
    226224   * 
    227    * @return String   userTrashCalendar 
     225   * @return String   user inbox 
    228226   */ 
    229227  public String getUserInbox() { 
     
    239237  } 
    240238 
    241   /** Get the userCalendar 
    242    * 
    243    * @return String   userTrashCalendar 
     239  /** Get the user outbox 
     240   * 
     241   * @return String   user outbox 
    244242   */ 
    245243  public String getUserOutbox() { 
     
    255253  } 
    256254 
    257   /** Get the userCalendar 
    258    * 
    259    * @return String   userTrashCalendar 
     255  /** Get the user default view name 
     256   * 
     257   * @return String   default view name 
    260258   */ 
    261259  public String getDefaultUserViewName() { 
     
    277275  public String getPublicUser() { 
    278276    return publicUser; 
    279   } 
    280  
    281   /** Set the directory browsing disallowed 
    282    * 
    283    * @param val    boolean directory browsing disallowed 
    284    */ 
    285   public void setDirectoryBrowsingDisallowed(boolean val) { 
    286     directoryBrowsingDisallowed = val; 
    287   } 
    288  
    289   /** 
    290    * 
    291    * @return boolean 
    292    */ 
    293   public boolean getDirectoryBrowsingDisallowed() { 
    294     return directoryBrowsingDisallowed; 
    295277  } 
    296278 
     
    529511    sb.append("publicUser="); 
    530512    sb.append(getPublicUser()); 
    531     sb.append("directoryBrowsingDisallowed="); 
    532     sb.append(getDirectoryBrowsingDisallowed()); 
    533513 
    534514    sb.append("httpConnectionsPerUser="); 
     
    576556    clone.setDefaultUserViewName(getDefaultUserViewName()); 
    577557    clone.setPublicUser(getPublicUser()); 
    578     clone.setDirectoryBrowsingDisallowed(getDirectoryBrowsingDisallowed()); 
    579558 
    580559    clone.setHttpConnectionsPerUser(getHttpConnectionsPerUser()); 
  • trunk/calendar3/config/configs/democal.properties

    r59 r64  
    2626org.bedework.global.system.name=bedework 
    2727org.bedework.global.calintfclass=org.bedework.calcore.hibernate.CalintfImpl 
     28org.bedework.global.directory.browsing.disallowed=false 
    2829 
    2930# 
     
    4546org.bedework.syspar.public.user=public-user 
    4647 
    47 org.bedework.syspar.directory.browsing.disallowed=false 
    4848org.bedework.syspar.http.connections.peruser=10 
    4949org.bedework.syspar.http.connections.perhost=50 
  • trunk/calendar3/config/src/org/bedework/webconfig/collections/Globals.java

    r63 r64  
    5656 
    5757import org.bedework.webconfig.props.BooleanProperty; 
    58 import org.bedework.webconfig.props.IntProperty; 
    5958import org.bedework.webconfig.props.ConfigProperty; 
    6059 
     
    7675 
    7776    addProperty(new ConfigProperty("calintfclass", "calintfclass", true)); 
     77 
     78    addProperty(new BooleanProperty("dirbrowsingDisallowed", 
     79                                         "directory.browsing.disallowed", 
     80                                         true)); 
    7881  } 
    7982} 
    80  
  • trunk/calendar3/config/src/org/bedework/webconfig/collections/Syspars.java

    r63 r64  
    5555package org.bedework.webconfig.collections; 
    5656 
    57 import org.bedework.webconfig.props.BooleanProperty; 
    5857import org.bedework.webconfig.props.IntProperty; 
    5958import org.bedework.webconfig.props.ConfigProperty; 
     
    9897    addProperty(new ConfigProperty("public.user", "public.user", true, true)); 
    9998 
    100     addProperty(new BooleanProperty("dirbrowsingDisallowed", 
    101                                          "directory.browsing.disallowed", 
    102                                          true)); 
    103  
    10499    addProperty(new IntProperty("http.connections.peruser", "http connections per user", true, true)); 
    105100 
     
    117112  } 
    118113} 
    119  
  • trunk/calendar3/deployment/webadmin/webapp/resources/default/default/default.xsl

    r63 r64  
    19191919        </tr> 
    19201920        <tr> 
    1921           <th>Directory browsing disallowed:</th> 
    1922           <td> 
    1923             <xsl:variable name="dirBrowse" select="/bedeworkadmin/system/directoryBrowsingDisallowed"/> 
    1924             <xsl:choose> 
    1925               <xsl:when test="$dirBrowse = 'true'"> 
    1926                 <input type="radio" name="directoryBrowsingDisallowed" value="true" checked="checked"/> true 
    1927                 <input type="radio" name="directoryBrowsingDisallowed" value="false"/> false 
    1928               </xsl:when> 
    1929               <xsl:otherwise> 
    1930                 <input type="radio" name="directoryBrowsingDisallowed" value="true"/> true 
    1931                 <input type="radio" name="directoryBrowsingDisallowed" value="false" checked="checked"/> false 
    1932               </xsl:otherwise> 
    1933             </xsl:choose> 
    1934           </td> 
    1935         </tr> 
    1936         <tr> 
    19371921          <th>Http connections per user:</th> 
    19381922          <td> 
  • trunk/calendar3/docs/todo.txt

    r59 r64  
    22 
    33-------------------------------------------------------------------------------- 
    4 MAKE DEFAULT LOCALE=default 
    5 -------------------------------------------------------------------------------- 
    6 -------------------------------------------------------------------------------- 
    7 Unremovable subscriptions - add to webadmin 
     4-------------------------------------------------------------------------------- 
     5-------------------------------------------------------------------------------- 
    86-------------------------------------------------------------------------------- 
    97-------------------------------------------------------------------------------- 
     
    4240Acl.encode should not encode Ace with inherited = true 
    4341-------------------------------------------------------------------------------- 
    44 Access control not quite right. The requirements are something like: 
    45  
    46 Changes to access further up the tree should affect subtrees through inheritence 
    47 i.e. on paths 
    48     /user/douglm/special/calendar1 
    49     /user/douglm/special/calendar2 
    50 Setting access to read, authenticated on special should allow all authenticated 
    51 users to read calendar1 and calendar2. 
    52  
    53 However a specific access to calendar2 of none, johnsa should make calendar1 
    54 unreadable to johnsa but not anybody else. 
    55  
    56 Also a specific access to special of none, johnsa should make calendar1 and 
    57 calendar2 unreadable to johnsa but not anybody else. In addition if I add 
    58 /user/douglm/special/calendar3 it should automatically take the same access 
    59 rights, i.e. johnsa has no access. 
    60  
    61 What if I already set none,schwag on 'douglm', that is set the default access 
    62 for all my stuff to none, schwag? 
    63  
    64 It seems that to calculate access we need to go up the tree accumulating 
    65 SPECIFIC access rights till we reach the root - which has the default access. 
    66  
    67 At that point we determine the access the user has based on those acls. 
    68  
    69 We should set a flag in the acl indicating if this is an inherited acl. Webdav 
    70 likes to know this. Also when a user is chaging access they want to know if the 
    71 current access is inherited or set in the object. They may want to isolate an 
    72 object from changes above it by explicitly setting access rights. 
    73  
    74 Also, we need a lot of caching - this is a frequent operation. Within a single 
    75 request, we can build a table of calculated acls with the path (and owner) as 
    76 the key. 
    77  
    78 Don't forget the case of referenced events. We may be looking in 
    79     /user/douglm/special/calendar1 
    80 but the actual event may be in 
    81     /user/johnsa/calendar 
    82  
    83 (Isn't it the case though, that the path defines the owner) 
    84  
    85 The frequent searches are going to be for BwCalendar objects. These should be 
    86 cached by hibernate. In additon we should cache all calculated acls for a given 
    87 path, along with a checksum of some kind - the sum of the seq values on the path 
    88 maybe. We could get the whole path - if the sum is the same don't rebuild acl. 
    89  
    90 Process for checking access becomes something like: 
    91  
    92 Check the table for the merged access for the current path. For an event the 
    93 path is that of the containing calendar. For calendars it's the path to the 
    94 object itself. 
    95  
    96 If the path does not exist, create a merged Acl and add it to the table. 
    97  
    98 For an event if there is any access info in the event create a merged acl. 
    99 For an event with no access info or a calendar just use the path acl. 
    100  
    101 Check the access against the acl. 
    102  
    103 This step can be optimised further by keeping the result of checks against that 
    104 path with that principal. 
    10542-------------------------------------------------------------------------------- 
    10643Need to ensure update doesn't change the guid 
     
    470407Caldav access reports probably need fixing 
    471408-------------------------------------------------------------------------------- 
    472  * <p>Some notes on DTSTART and DTEND from caldav mail-list exchanges 
    473  * <pre> 
    474  * -------------------------------------------------------------------- 
    475  * rfc2445 is unclear if the DTEND is inclusive or exclusive when both the 
    476  * DTSTART and DTEND are DATEs. 
    477  * -------------------------------------------------------------------- 
    478  * Afaik RFC 2445 does not say anything about allday events, but in all 
    479  * implementations I have seen so far the DTEND is exclusive. 
    480  * 
    481  * Example for a one day allday event on Jul 15: 
    482  * 
    483  * DTSTART;VALUE=DATE:20050715 
    484  * DTEND;VALUE=DATE:20050716 
    485  * 
    486  * Think of this being another form for midnight to midnight local time: 
    487  * 
    488  * DTSTART:20050715T000000 
    489  * DTEND:20050716T000000 
    490  * 
    491  * Carsten 
    492  * -------------------------------------------------------------------- 
    493  * To find the language about this, you have to look in the (not 
    494  * intuitively located) VEVENT definition.  It says: 
    495  * 
    496  * The "DTSTART" property for a "VEVENT" specifies the inclusive start 
    497  *  of the event. For recurring events, it also specifies the very first 
    498  *  instance in the recurrence set. The "DTEND" property for a "VEVENT" 
    499  *  calendar component specifies the non-inclusive end of the event. 
    500  * 
    501  * It doesn't say anything specific about DATE valued events, so DTEND is 
    502  * always exclusive. 
    503  * 
    504  * In practice, Apple's iCal always exports one-day all-day events with an 
    505  * explicit DTEND of the day after the start.  I scratched my head about 
    506  * that for a while, too, till I looked in VEVENT. 
    507  * 
    508  * Sincerely, Jeffrey Harris 
    509  * -------------------------------------------------------------------- 
    510  * Which also makes sense with the DATETIME case (i.e. a 'ponctual' event): 
    511  * "For cases where a "VEVENT" calendar component 
    512  *    specifies a "DTSTART" property with a DATE-TIME data type but no 
    513  *    "DTEND" property, the event ends on the same calendar date and time 
    514  *    of day specified by the "DTSTART" property. 
    515  * 
    516  * > In practice, Apple's iCal always exports .... 
    517  * 
    518  * 
    519  * I'm not sure it's 'always'. I think that with our implementation you  might get in 
    520  * some cases a  one-day DATE valued event without a DTEND. 
    521  * -------------------------------------------------------------------- 
    522  * Then please see the following mail by Frank Dawson, who is one of the original 
    523  * authors of rfc 2445: 
    524  * http://www.imc.org/ietf-calendar/archive1/msg03648.html 
    525  * 
    526  * In particular: 
    527  * >I agree that the RFC does not seem very clear for the DTEND of an event. 
    528  * >A clarificaiton on the meaning of the term "non-inclusive" would be good. 
    529  * >Editors? 
    530  * >I would think that if an event had DTSTART:199900801 and DTEND:19990802 
    531  * >then that would equal 2 full days of busy time 
    532  * (from 19990801000000Z to 19990802235959.  Correct? 
    533  * 
    534  * We explicitly got feedback to add the "non-inclusive" term. 
    535  * It means up to "T235959". Yes, you are correct in your interpretation. 
    536  * Similarly, a DTSTART;VALUE=DATE:19990730 means "-T000000" to "-T235959". 
    537  * 
    538  * I found this mail only recently, and so far (from KDE 3.1 until 3.4.2) we 
    539  * (Korganizer and Kontact resp.)also interpreted non-inclusive to mean that 
    540  * DTEND should be the first date after the event. A while ago I also talked 
    541  * with one of the evolution developers and he agreed that if Frank's mail is 
    542  * true, we might have misunderstood rfc 2445. 
    543  * 
    544  * So, the question is now what to do about this. Shall we stick to the 
    545  * interpretation that "non-inclusive" means that DTEND needs to be first date 
    546  * after the item? Or shall we use the correct interpretation from now on? 
    547  * 
    548  * The reason I'm asking is that we are releasing KDE 3.5 shortly, and currently 
    549  * I fixed it to use Frank's interpretation. 
    550  * -------------------------------------------------------------------- 
    551  * 
    552  * Wow.  You're right, it looks like their intention was for non-inclusive 
    553  * to mean not including the last minute of but including the rest of the 
    554  * day.  That's sure not the way I read that language, so lets come up with 
    555  * better language for 2445bis as Lisa suggests. 
    556  * 
    557  * It seems to me that there's lots of iCal data out there with the 
    558  * "doesn't include the whole day" interpretation, I suspect Outlook does 
    559  * the same thing.  So I'd suggest we change the language in 2445bis to say 
    560  * something like: 
    561  * 
    562  * "When a DATE value is used for DTEND no time during the given day is 
    563  * included in the component, so 
    564  * 
    565  * DTSTART;VALUE=DATE:20050101 
    566  * DTEND;VALUE=DATE:20050102 
    567  * 
    568  * represents a 24 hour period." 
    569  * 
    570  * It's too bad there's data in the wild that means this, I really think 
    571  * dates for dtends would adhere to common usage better if they were 
    572  * inclusive, but ce la vies. 
    573  * 
    574  * Sincerely, Jeffrey Harris 
    575  * -------------------------------------------------------------------- 
    576  
    577 But there are other places in rfc 2445 which suggest that the DTEND is the 
    578 last date of the event: 
    579  
    580 Sec 4.6.1: "The anniversary type of 
    581    "VEVENT" can span more than one date (i.e, "DTEND" property value is 
    582    set to a calendar date after the "DTSTART" property value)." 
    583  
    584 In particular that last sentence says that it's a multi-day event if DTEND is 
    585 not eqal to DTSTART, so your example from below is a two-day event. 
    586  
    587 Sec 4.6.1: "For cases where a "VEVENT" calendar component specifies a "DTSTART" 
    588    property with a DATE data type but no "DTEND" property, the events 
    589    non-inclusive end is the end of the calendar date specified by the 
    590    "DTSTART" property. 
    591  
    592 This last sentence is a strong indication that "non-inclusive" was intended to 
    593 be understood the way Frank explained. 
    594  
    595 The problem then is that DTEND and DURATION are not required. If you have only 
    596 a DTSTART, e.g. 
    597  
    598 DTSTART;VALUE=DATE:20050101 
    599  
    600 the above quote says that this is equivalent to 
    601  
    602 DTSTART;VALUE=DATE:20050101 
    603 DTEND;VALUE=DATE:20050101 
    604  
    605 How would you have to understand this? And what would be the difference to 
    606  
    607 DTSTART;VALUE=DATE:20050101 
    608 DTEND;VALUE=DATE:20050102 
    609  
    610 Cheers, Reinhold 
    611  * -------------------------------------------------------------------- 
    612 If we followed what I believe iCal is doing (and what I have done in 
    613 Chandler, following iCal, but Chandler's not shipping so it can change 
    614 however we want), there would be no semantic difference between the 
    615 three examples above. 
    616  
    617 I'll freely admit I have lots of special casing in Chandler to deal with 
    618 this oddity, I'd be delighted to get rid of it.  Unfortunately, I think 
    619 given how widespread the above (admittedly not the intended by the 
    620 authors) interpretation is in actual use, we need to work with it for 
    621 VERSION:2.0 iCalendar. 
    622  
    623 We should probably find out what different implementations are doing 
    624 what with VALUE=DATE events at the upcoming CalConnect...  Perhaps if 
    625 it's just iCal, we could special case anything old iCal data, but that 
    626 sounds like a nightmare to me. 
    627  
    628 Sincerely, Jeffrey 
    629  * -------------------------------------------------------------------- 
    630  I treat DTEND as always being exclusive in iCalendar data - even for date-only 
    631  values. However, when a user edits or creates an 'all-day' event, the 
    632  displayed end time is actually the inclusive end. So I basically map between 
    633  inclusive/exclusive values for display purposes because I found inclusive 
    634  end to be more intuitive for users. i.e it makes more sense that a two day 
    635  event starts on Monday and ends on Tuesday, than it does to start on Monday 
    636  and end on Wednesday (the exclusive option). 
    637  
    638 Cyrus Daboo 
    639  * -------------------------------------------------------------------- 
    640 Unfortunately it's not just iCal. Just to name a few others that do the same 
    641 thing: Evolution, Sunbird, Outlook/MSN and the next release of the Scalix 
    642 server. Some vendors (Microsoft for example) also introduced their own property 
    643 to explicitely mark an event as all-day. 
    644  * -------------------------------------------------------------------- 
    645  Where does it leave us? 
    646  
    647  DATE-TIME start, no end        --  zero time at indicated time 
    648  DATE-TIME start, DATE end      --  is that allowed, means remainder of day? 
    649  DATE-TIME start, DATE-TIME end --  from start, up to, not including end 
    650  DATE start                     --  all day event 
    651  DATE start, DATE end           --  end - start + 1 all day(s) 
    652  * -------------------------------------------------------------------- 
    653  * </pre> 
    654 -------------------------------------------------------------------------------- 
    655 -------------------------------------------------------------------------------- 
    656 -------------------------------------------------------------------------------- 
    657  
     409-------------------------------------------------------------------------------- 
     410-------------------------------------------------------------------------------- 
     411-------------------------------------------------------------------------------- 
     412 
  • trunk/calendar3/dumprestore/build.xml

    r59 r64  
    248248      <arg value="${org.bedework.syspar.public.user}" /> 
    249249 
    250       <arg value="-dirbrowsing-disallowed" /> 
    251       <arg value="${org.bedework.syspar.dirbrowsing.disallowed}" /> 
    252  
    253250      <arg value="-httpconnsperuser" /> 
    254251      <arg value="${org.bedework.syspar.http.connections.peruser}" /> 
  • trunk/calendar3/dumprestore/resources/initbedework.xml

    r59 r64  
    1515      <defaultUserViewName>All</defaultUserViewName> 
    1616      <publicUser>public-user</publicUser> 
    17       <directoryBrowsingDisallowed>false</directoryBrowsingDisallowed> 
    1817      <httpConnectionsPerUser>10</httpConnectionsPerUser> 
    1918      <httpConnectionsPerHost>50</httpConnectionsPerHost> 
  • trunk/calendar3/dumprestore/src/org/bedework/dumprestore/dump/dumpling/DumpSyspars.java

    r54 r64  
    8787    taggedVal("publicUser", s.getPublicUser()); 
    8888 
    89     taggedVal("directoryBrowsingDisallowed", s.getDirectoryBrowsingDisallowed()); 
    90  
    9189    taggedVal("httpConnectionsPerUser", s.getHttpConnectionsPerUser()); 
    9290    taggedVal("httpConnectionsPerHost", s.getHttpConnectionsPerHost()); 
  • trunk/calendar3/dumprestore/src/org/bedework/dumprestore/restore/Restore.java

    r59 r64  
    363363        globals.syspars.setPublicUser(args[i]); 
    364364 
    365       } else if (argpar("-dirbrowsing-disallowed", args, i)) { 
    366         i++; 
    367         globals.syspars.setDirectoryBrowsingDisallowed("true".equals(args[i])); 
    368         globals.sysparsSetDirectoryBrowsingDisallowed = true; 
    369  
    370365      } else if (argpar("-httpconnsperuser", args, i)) { 
    371366        i++; 
  • trunk/calendar3/dumprestore/src/org/bedework/dumprestore/restore/RestoreGlobals.java

    r59 r64  
    116116  public BwSystem syspars = new BwSystem(); 
    117117 
    118   /** Show syspars.setDirectoryBrowsingDisallowed was set */ 
    119   public boolean sysparsSetDirectoryBrowsingDisallowed; 
    120118  /** show syspars.setHttpConnectionsPerUser was set */ 
    121119  public boolean sysparsSetHttpConnectionsPerUser; 
  • trunk/calendar3/dumprestore/src/org/bedework/dumprestore/restore/rules/SysparsFieldRule.java

    r59 r64  
    100100      ent.setPublicUser(parval(globals.syspars.getPublicUser(), stringFld())); 
    101101 
    102     } else if (name.equals("directoryBrowsingDisallowed")) { 
    103       if (globals.sysparsSetDefaultUserQuota) { 
    104         ent.setDirectoryBrowsingDisallowed(globals.syspars.getDirectoryBrowsingDisallowed()); 
    105       } else { 
    106         ent.setDirectoryBrowsingDisallowed(booleanFld()); 
    107       } 
    108  
    109102    } else if (name.equals("httpConnectionsPerUser")) { 
    110103      ent.setHttpConnectionsPerUser(parval(globals.syspars.getHttpConnectionsPerUser(), 
  • trunk/calendar3/webadmin/src/org/bedework/webadmin/system/UpdateSysparsAction.java

    r60 r64  
    105105    } 
    106106 
    107     Boolean bool = getBooleanReqPar(request, "directoryBrowsingDisallowed"); 
    108     if (bool != null) { 
    109       syspars.setDirectoryBrowsingDisallowed(bool.booleanValue()); 
    110       changed = true; 
    111     } 
    112  
    113107    int intVal = getIntReqPar(request, "httpConnectionsPerUser", -1); 
    114108    if (intVal >= 0) { 
  • trunk/calendar3/webadmin/war/docs/system/modSyspars.jsp

    r60 r64  
    1111<system> 
    1212  <defaultUserViewName><bean:write name="systemParams" property="defaultUserViewName"/></defaultUserViewName> 
    13   <directoryBrowsingDisallowed><bean:write name="systemParams" property="directoryBrowsingDisallowed"/></directoryBrowsingDisallowed> 
    1413  <httpConnectionsPerUser><bean:write name="systemParams" property="httpConnectionsPerUser"/></httpConnectionsPerUser> 
    1514  <httpConnectionsPerHost><bean:write name="systemParams" property="httpConnectionsPerHost"/></httpConnectionsPerHost>