From: Jo R. <jr...@ne...> - 2008-03-12 23:34:38
|
No patches attached? (I don't have the original e-mail around any more) On Mar 5, 2008, at 1:02 PM, Blake Cornell wrote: > I believe I made the patches correctly. Let me know if this is > correct. > > This patch only has the on/off functionality, it does not have the > granularity for a per user functionality. > > Thanks, > > Blake > > Jo Rhett wrote: >> I'm sorry, I overlooked that option. Yes, I could make an if/ >> then around a variable to support this behavior, no problem. >> Right now publish.php doesn't (yet, I think) read the main >> configuration file, so it would have to be edited in the publish >> script itself. >> (I have a version that does, but I'm pretty sure it's not >> published/release-quality yet) >> >> If you send me a patch with this functionality in an if/then, I'd >> be fine integrating it. >> >> On Mar 4, 2008, at 7:02 AM, Blake Cornell wrote: >> >>> Luckily for me hacking in this functionality was quick and >>> easy. Since >>> phpIcal had everything I was looking for except that, well, >>> simply, now >>> it has everything I need. >>> >>> I've yet to check out your previous comments regarding re-working >>> the >>> authentication system, but yet agree that it would take quite a >>> bit of >>> planning and implementing. I looked into it before I got your >>> response. >>> >>> I'm unsure of the development schedule for this project but do >>> plan on >>> implementing this feature version by version for myself (I >>> expect it to >>> take less then 15 minutes). I've already added a global variable to >>> switch this functionality on and off. If this feature were to >>> ever be >>> 'supported', it would have to allow global and user specific >>> hooks. In >>> all, its not my call to do this or not. >>> >>> In the least, thanks for your input. >>> >>> -Blake >>> >>> >>> Jo Rhett wrote: >>> >>>> On Feb 21, 2008, at 10:56 AM, Blake Cornell wrote: >>>> >>>> >>>>> User engineering has a calendar called managment. User management >>>>> has a >>>>> calendar called engineering (don't ask me how this would >>>>> happen, users >>>>> are supposed to do things like this). They both are allowed to >>>>> post >>>>> their calendars. Little do they know, they can't overwrite each >>>>> others >>>>> calendars cause they are locked to publish calendars as their user >>>>> name. It allows me a greater piece of mind for the admin (me). >>>>> >>>>> >>>> The real, honest answer is: phpIcalendar was never intended to >>>> solve >>>> this problem, and will require an extensive rewrite to do so. >>>> >>>> You can hack around this problem by having all of the calendars >>>> be in >>>> subfolders, and limit the write access to each subfolder using >>>> apache >>>> controls. >>>> >>>> But yes, it's a hack. >>>> >>>> >>>> >>> -------------------------------------------------------------------- >>> -- --- >>> This SF.net email is sponsored by: Microsoft >>> Defy all challenges. Microsoft(R) Visual Studio 2008. >>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>> _______________________________________________ >>> Phpicalendar-devel mailing list >>> Php...@li... >>> https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel >>> >> >> > > --- config.inc.php 2008-03-05 15:58:31.000000000 -0500 > +++ config.inc-dist.php 2007-02-16 01:34:10.000000000 -0500 > @@ -99,5 +99,4 @@ > $apache_map['user3'] = array(''); // given any login/logout > options. Calendar names not include the .ics suffix. > $apache_map['user4'] = array(''); // Example: $apache_map > ['username'] = array('Calendar1', 'Calendar2'); > // add more lines as necessary > -$lock_cal_auth_user = '1'; // renames apache authenticated > users to publish calendars by their username only > ?> > --- publish.php 2007-05-18 16:46:32.000000000 -0400 > +++ publish.php.1 2008-03-05 15:56:45.000000000 -0500 > @@ -211,7 +211,13 @@ > } > > // write to file > - if($dataout = fopen($calendar_path.$calendar_name.'.ics','w+')){ > + $curCal = ''; > + if($lock_cal_auth_user == '1') { > + $curCal = $calendar_path.retUser(); > + }else{ > + $curCal = $calendar_path.$calendar_name; > + } > + if($dataout = fopen($curCal.'.ics','w+')){ > fputs($dataout, $data, strlen($data) ); > @fclose($dataout); > }else{ > @@ -261,4 +267,12 @@ > fputs($logfile, $logline, strlen($logline) ); > } > } > + > +function retUser() { > + if($_SERVER['PHP_AUTH_USER'] ) { > + return $_SERVER['PHP_AUTH_USER']; > + }else{ > + return $_SERVER['REMOTE_USER']; > + } > +} > ?> > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Phpicalendar-devel mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpicalendar-devel -- Jo Rhett Net Consonance : consonant endings by net philanthropy, open source and other randomness |