Changeset 65
- Timestamp:
- 02/02/06 11:38:38
- Files:
-
- trunk/calendar3/bldfiles/buildwar.xml (modified) (1 diff)
- trunk/calendar3/calsvc/src/org/bedework/calsvc/CalSvc.java (modified) (1 diff)
- trunk/calendar3/webadmin/war/WEB-INF/classes/servlet.properties (modified) (1 diff)
- trunk/calendar3/webadmin/war/docs/subs/modSubscription.jsp (modified) (1 diff)
- trunk/calendar3/webclient/war/WEB-INF/classes/servlet.properties (modified) (1 diff)
- trunk/calendar3/webcommon/src/org/bedework/webcommon/BwAbstractAction.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/calendar3/bldfiles/buildwar.xml
r2 r65 137 137 value="${propval.app.guestmode}" /> 138 138 139 <!-- Change this to be an app par --> 140 <filter token="RUN-AS-USER" 141 value="${org.bedework.syspar.public.user}" /> 142 139 143 <!-- ??????? 140 144 <filter token="CALFILE-NAME" trunk/calendar3/calsvc/src/org/bedework/calsvc/CalSvc.java
r55 r65 1867 1867 } 1868 1868 1869 if (debug) { 1870 trace("PublicAdmin: " + pars.getPublicAdmin() + " user: " + 1871 pars.getUser()); 1872 } 1873 1874 if (pars.getPublicAdmin()) { 1875 /* We may be running as a different user. The prefeences we want to see 1876 * are those of the user we are running as - i.e. the 'run.as' user for 1877 * not those of the authenticated user. 1878 */ 1879 dbi.close(); 1880 BwUser user = cali.getUser(pars.getUser()); 1881 dbi = new CalSvcDb(this, user); 1882 } 1883 1869 1884 return cali; 1870 1885 } finally { trunk/calendar3/webadmin/war/WEB-INF/classes/servlet.properties
r2 r65 27 27 # true if this application should run in guest mode only 28 28 org.bedework.guestmode=false 29 30 # The user this application will run as. 31 org.bedework.run.as=@RUN-AS-USER@ 29 32 30 33 # This provides a reference to the public events calendar as a convenience trunk/calendar3/webadmin/war/docs/subs/modSubscription.jsp
r60 r65 17 17 <emailNotifications><bean:write name="peForm" property="subscription.emailNotifications" /></emailNotifications> 18 18 <calendarDeleted><bean:write name="peForm" property="subscription.calendarDeleted" /></calendarDeleted> 19 <unremoveable><bean:write name=" subscription" property="unremoveable" /></unremoveable>19 <unremoveable><bean:write name="peForm" property="subscription.unremoveable" /></unremoveable> 20 20 </subscription> 21 21 trunk/calendar3/webclient/war/WEB-INF/classes/servlet.properties
r2 r65 28 28 # true if this application should run in guest mode only 29 29 org.bedework.guestmode=@APP-GUESTMODE@ 30 31 # The user this application will run as. 32 org.bedework.run.as=@RUN-AS-USER@ 30 33 31 34 # true if this application is the public admin client trunk/calendar3/webcommon/src/org/bedework/webcommon/BwAbstractAction.java
r55 r65 529 529 } 530 530 531 /** Return user we run as. 532 * 533 * @param frm 534 * @return String run-as user name 535 * @throws Throwable 536 */ 537 public String getRunAsUser(UtilActionForm frm) throws Throwable { 538 return JspUtil.getReqProperty(frm.getMres(), "org.bedework.run.as"); 539 } 540 531 541 /** get an env object initialised appropriately for our usage. 532 542 * … … 764 774 hsess.setAttribute(BwCallback.cbAttrName, cb); 765 775 766 svci = new CalSvc(); 767 CalSvcIPars pars = new CalSvcIPars(user, access, user, publicAdmin, 768 false, // caldav 769 null, // synchId 770 debug); 771 svci.init(pars); 772 773 BwWebUtil.setCalSvcI(request, svci); 774 775 form.setCalSvcI(svci); 776 String runAsUser = user; 776 777 777 778 try { 779 svci = new CalSvc(); 780 if (publicAdmin || (user == null)) { 781 runAsUser = getRunAsUser(form); 782 } 783 CalSvcIPars pars = new CalSvcIPars(user, access, runAsUser, publicAdmin, 784 false, // caldav 785 null, // synchId 786 debug); 787 svci.init(pars); 788 789 BwWebUtil.setCalSvcI(request, svci); 790 791 form.setCalSvcI(svci); 792 778 793 cb.in(true); 794 } catch (CalFacadeException cfe) { 795 throw cfe; 779 796 } catch (Throwable t) { 780 if (t instanceof CalFacadeException) {781 throw (CalFacadeException)t;782 }783 797 throw new CalFacadeException(t); 784 798 }
