PluginWebDav » History » Version 3

« Previous - Version 3/10 (diff) - Next » - Current version
Arnaud Martel, 2010-08-03 13:31


Introduction

This WebDav plugin is mainly a POC (proof of concept) for accessing files and documents using WebDav protocol.
This plugin is a fork of this existing railsdav plugin ("railsdav) with some modifications to make it run with REDMINE.

This was done using REDMINE r3826 (=> 0.9.5 +) but any release after 0.9 should work

Main features:
  • webdav access to a project is done using an url like http://myserver/redmine/webdav
  • the plugin allows you to see folders with the following structure:
    project1
       + documents
       |    + title_document1
       |    |     + file1
       |    |     + file2
       |    |     
       |    + title_document2
       |          + file1
       |          + file2
       |
       + files
       |    + file1 (with no version)
       |    + file2 (with no version)
       |    + Version1
       |    |     + file1
       |    |     + file2
       |    |
       |    + Version2
       |          + file1
       |          + file2
       |
       + subversion
            + branches
            + tags
            + trunk
    project2
       + documents
       + files
    project3
       + documents
       + subversion
    
    
  • plugin is using REDMINE permissions (:view_files, :manage_files, :view_documents and :manage_documents) to grant access to files and folders/documents
  • plugin allows you all files operations (create, delete, rename, move and copy)
  • plugin allows you to create documents (just create a folder inside documents folder) but version creation is not allowed
  • plugin allows repository access through WEBDAV (Read/Write for subversion and filesystem SCM if repositories are on the redmine server, Read only for all others SCM supported in REDMINE)
  • folder names used (ie: files/documents/subversion in the example) can be changed through per project settings

Setup

WEBDAV is using basic HTTP authentication which is not supported in REDMINE core (at least in 0.9.5). A workaround is to use this very nice plugin redmine_http_auth in conjunction with Apache and RedmineAdvanced.pm (located in redmine_webdav/extra/svn)

About subversion support:
To commit changes in Subversion, the plugin opens the repository with the file protocol. For this reason, you need the following:
  • The repositories have to be installed on the REDMINE server.
  • Plugin will replace the beginning of your repository location ([protocol]://[server]/" with "file:///svnroot/". You may need to create a symbolic link /svnroot for this to work...

1. Install plugin into vendor/plugins

If you want to install redmine_http_auth, run the following command from your redmine directory: Then install redmine_webdav with:

2. Get the required gems

<a href="http://github.com/stueccles/railsdav">Railsdav</a> needs these 2 plugins:
  • unicode
  • shared-mime-info
Under linux, install is done with:
  • sudo gem install unicode
  • sudo gem install shared-mime-info

3. Configure your web server

Assuming you are using RHEL5/CentOS5:
  • Copy redmine_webdav/extra/svn/RedmineAdavanced.pm in /etc/httpd/Apache/Authn
  • Create the file /etc/httpd/conf.d/redmine_webdav.conf
<Location /redmine/webdav>
   AuthType Basic
   AuthName REDMINE
   Require valid-user
   PerlAccessHandler Apache::Authn::RedmineAdvanced::access_handler
   PerlAuthenHandler Apache::Authn::RedmineAdvanced::authen_handler
   RedmineDSN "DBI:mysql:database=redmine;host=192.168.10.1;port=3306" 
   RedmineDbUser "redmine" 
   RedmineDbPass "password" 
   RedmineAuthenticationOnly "On" 
  Order allow,deny
  Allow from 127.0.0.1
  Satisfy Any
</Location>

4. Restart your web server

/etc/init.d/httpd restart

5. Configure REDMINE with your web browser

If everything is OK, you should see both plugins (WebDav and HTTP authentication) in the plugin list (Administration -> Plugins)

New permissions are now available and you have to assign them to the roles you need

6. Set up your project

Don't forget to activate the webdav module in the projects where you want to access files over WevDav

7. Use webdav to manage files and documents

You have to use a WebDav client in order to use the plugin.

For MacOSX (webdav access is natively supported):
  • Open the finder and choose "Go to -> Connect to server..."
  • enter http://myserver/redmine/webdav as the url of the server
  • enter your credentials (login/password)
  • You're in

For linux:
TODO

For WindowsXP:
  • Open My Network Places.
  • Double-click Add Network Place.
  • Click Next twice, then type http://myserver/redmine/webdav
  • Click Next
  • enter your credentials (login/password)
  • Click Finish

Original author's README:

Railsdav (WebDAV for Ruby On Rails) ===================================

THIS IS A MODIFIED VERSION OF THE ORIGINAL Railsdav, created by Marcello Nuccio. I have done it because I was not able to make to use the original one.

READ COMMENTS IN lib/acts_as_webdav.rb TO START!

Railsdav is a plugin which allows for custom WebDAV controllers to be added to a Ruby On Rails application to expose functionality as filesystems to WebDAV clients such as Mac OS X Finder, Windows Network Places, Dreamweaver etc.

Railsdav requires the following gems in addition to rails

  • unicode (gem install unicode)
  • shared-mime-info (gem install shared-mime-info)

Railsdav was created by Stuart Eccles (http://www.liverail.net/). I'd like to thank the following people for assisting with Railsdav

  • Albert Ramstedt who contributed bug fixes for a variety of code issues and helped with re-structuring the plugin
  • Alex MacCaw
  • Fabien Franzen

History

0.1.1 : 2010-08-03
  • new: support WRITE operations for filesystem SCM

0.1.0 : 2010-07-23
Minor evolution with refactoring...

  • new: add repository access through WEBDAV (Read/Write for subversion if repositories are on the redmine server, Read only for all others supported SCM)
  • new: settings per project with new permission (manage WEBDAV)

0.0.1 : 2010-07-06
Initial release