Project

General

Profile

PluginWebDav » History » Version 4

Arnaud Martel, 2010-08-23 16:09

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