Before we see if we can do this ourselves, has anyone hacked Instiki to have a password-protected wiki web ask for the author on the login page & subsequently suppress the author field on the edit page? Thanks, Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/instiki-users/attachments/20060118/985410f4/attachment.htm
Hi Ben, On 1/19/06, BG - Ben Armstrong <BArmstrong at dymaxion.ca> wrote:> Before we see if we can do this ourselves, has anyone hacked Instiki to > have a password-protected wiki web ask for the author on the login page & > subsequently suppress the author field on the edit page?Am not aware of any such work but it should not be hard to hack: All you need it to set the cookie at the login page, and retrieve it in the #save action (and remove the textfield for author name from the view of course). Let us know if you need more info... and patches are always welcome :-) Cheers, Assaph
On Fri, 2006-01-20 at 00:21 +1100, Assaph Mehr wrote:> Am not aware of any such work but it should not be hard to hack: All > you need it to set the cookie at the login page, and retrieve it in > the #save action (and remove the textfield for author name from the > view of course). > > Let us know if you need more info... and patches are always welcome :-)This is not very general purpose, I''m afraid, but it does the job for us. The one thing I didn''t understand was this ''default="yes"'' business in the password field in login.rhtml. I couldn''t find any doc on that attribute. Something to do with being able to press enter in a textfield to submit the form? But now that we have two text fields, I think we need a submit button of some sort, so I added one. Ben -------------- next part -------------- A non-text attachment was scrubbed... Name: author.diff Type: text/x-patch Size: 3151 bytes Desc: not available Url : http://rubyforge.org/pipermail/instiki-users/attachments/20060119/63954fd3/author.bin
BG - Ben Armstrong
2006-Jan-24 14:24 UTC
[Instiki] Username on login form & init script for Ubuntu
I have been working on putting up an Instiki 0.10.2 server on an Ubuntu "breezy" system. As mentioned earlier, we would like to require a username to be entered (any username, so long as it isn''t "AnonymousCoward") at login time instead of when the page is edited. This patch is considerably improved over my first effort. In this version, I have properly supported configuring a wiki web, using edit_web, to require a username independently of requiring a password. See the attached patch, relative to 0.10.2. Also, config/environments/production.rb is patched to use the environment variable INSTIKILOG as the log file if it is set. Finally, I have also attached an init script. Some notes about this script: I would have preferred to use a pid file, but Instiki doesn''t create one in --daemon mode, and start-stop-daemon --make-pidfile --background is an ugly hack, so --user was much easier. To use this init script, I assume you have put unpacked the instiki tarball in /opt/instiki/ and have created an instiki user, e.g. adduser --system --group instiki --home /var/lib/instiki --shell /bin/sh You''re also on your own for log rollover. I have a script external to the system that triggers a nightly backup of the wiki and log rollver, pulling off the files across the network to another system. Most people will probably want to use logrotate instead. I would have liked to refine this manual setup and this init script into a proper package, but there are Debian packaging issues to address here that are larger than I have time to solve. I have tested this init script on Ubuntu "breezy", but it should work just as well on most Debian systems, provided the system has a compatible version of ruby, since the only other dependency is the self-contained instiki 0.10.2 tarball (and therein lies most of the difficulty of packaging: I''d have to make it play nice with the current version of ruby + rails on each target distribution). Ben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/instiki-users/attachments/20060124/d8d812e8/attachment.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: instiki_username_required.diff Type: text/x-patch Size: 10651 bytes Desc: not available Url : http://rubyforge.org/pipermail/instiki-users/attachments/20060124/d8d812e8/instiki_username_required.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: instiki Type: application/x-shellscript Size: 1704 bytes Desc: not available Url : http://rubyforge.org/pipermail/instiki-users/attachments/20060124/d8d812e8/instiki.bin