Project

General

Profile

PluginWebDav » History » Version 1

Arnaud Martel, 2010-07-06 17:11
Creation

1 1 Arnaud Martel
h1. Introduction
2
3
This WebDav plugin is mainly a POC (proof of concept) for accessing files and documents using WebDav protocol. 
4
This plugin is a fork of this existing railsdav plugin (""railsdav":http://github.com/funkensturm/railsdav) with some modifications to make it run with REDMINE.
5
6
This was done using REDMINE r3826 (=> 0.9.5 +) but any release after 0.9 should work
7
8
Main features:
9
*  webdav access to a project is done using an url like http://myserver/redmine/webdav
10
* the plugin allows you to see folders with the following structure:
11
<pre>
12
project1
13
   + documents
14
   |    + title_document1
15
   |    |     + file1
16
   |    |     + file2
17
   |    |     
18
   |    + title_document2
19
   |          + file1
20
   |          + file2
21
   |
22
   + files
23
        + file1 (with no version)
24
        + file2 (with no version)
25
        + Version1
26
        |     + file1
27
        |     + file2
28
        |
29
        + Version2
30
              + file1
31
              + file2
32
project2
33
   + documents
34
   + files
35
project3
36
   + documents
37
38
</pre>
39
* plugin is using REDMINE permissions (:view_files, :manage_files, :view_documents and :manage_documents) to grant access to files and folders/documents
40
* plugin allows you all files operations (create, delete, rename, move and copy)
41
* plugin allows you to create documents (just create a folder inside documents folder) but version creation is not allowed
42
43
44
45
h1. Setup
46
47
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":http://github.com/AdamLantos/redmine_http_auth in conjunction with Apache and RedmineAdvanced.pm (located in  redmine_webdav/extra/svn)
48
49
h3. 1. Install plugin into vendor/plugins
50
51
If you want to install redmine_http_auth, run the following command from your redmine directory:
52
* ruby script/plugin install http://github.com/AdamLantos/redmine_http_auth.git
53
54
Then install redmine_webdav with:
55
* ruby script/plugin install http://github.com/amartel/redmine_webdav.git
56
57
No DB migration is required...
58
59
h3. 2. Get the required gems
60
61
<a href="http://github.com/stueccles/railsdav">Railsdav</a> needs these 2 plugins:
62
* unicode
63
* shared-mime-info
64
65
Under linux, install is done with:
66
* sudo gem install unicode
67
* sudo gem install shared-mime-info
68
69
h3. 3. Configure your web server
70
71
Assuming you are using RHEL5/CentOS5:
72
* Copy redmine_webdav/extra/svn/RedmineAdavanced.pm in /etc/httpd/Apache/Authn
73
* Create the file /etc/httpd/conf.d/redmine_webdav.conf
74
75
<pre>
76
<Location /redmine/webdav>
77
   AuthType Basic
78
   AuthName REDMINE
79
   Require valid-user
80
   PerlAccessHandler Apache::Authn::RedmineAdvanced::access_handler
81
   PerlAuthenHandler Apache::Authn::RedmineAdvanced::authen_handler
82
   RedmineDSN "DBI:mysql:database=redmine;host=192.168.10.1;port=3306"
83
   RedmineDbUser "redmine"
84
   RedmineDbPass "password"
85
   RedmineAuthenticationOnly "On"
86
  Order allow,deny
87
  Allow from 127.0.0.1
88
  Satisfy Any
89
</Location>
90
</pre>
91
92
h3. 4. Restart your web server
93
94
/etc/init.d/httpd restart
95
96
h3. 5. Configure REDMINE with your web browser
97
98
If everything is OK, you should see both plugins (WebDav and HTTP authentication) in the plugin list (Administration -> Plugins)
99
100
A new permission is now available (Webdav access) and you have to assign it to the roles you need
101
102
h3. 6. Set up your project
103
104
Don't forget to activate the webdav module in the projects where you want to access files over WevDav
105
106
h3. 7. Use webdav to manage files and documents
107
108
You have to use a WebDav client in order to use the plugin. 
109
110
For MacOSX (webdav access is natively supported):
111
* Open the finder and choose "Go to -> Connect to server..."
112
* enter *http://myserver/redmine/webdav* as the url of the server
113
* enter your credentials (login/password)
114
* You're in
115
116
117
For linux:
118
TODO
119
120
For WindowsXP:
121
* Open *My Network Places*.
122
* Double-click *Add Network Place*.
123
* Click Next twice, then type *http://myserver/redmine/webdav*
124
* Click Next
125
* enter your credentials (login/password)
126
* Click Finish
127
128
129
130
131
h1. Original author's README:
132
133
Railsdav (WebDAV for Ruby On Rails)
134
===================================
135
136
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.
137
138
139
READ COMMENTS IN lib/acts_as_webdav.rb TO START!
140
141
142
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.
143
144
Railsdav requires the following gems in addition to rails
145
146
* unicode (gem install unicode)
147
* shared-mime-info (gem install shared-mime-info)
148
149
Railsdav was created by Stuart Eccles (http://www.liverail.net/). I'd like to thank the following people for assisting with Railsdav
150
151
*   Albert Ramstedt who contributed bug fixes for a variety of code issues and helped with re-structuring the plugin
152
*   Alex MacCaw
153
*   Fabien Franzen