Project

General

Profile

PluginWebDav » History » Version 2

Arnaud Martel, 2010-07-23 18:41
release 0.1.0

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