Rails 3.1 应用程序集成了 webdav 和身份验证?
我想为 Rails 3.1 应用程序启用 WebDav,其中我使用 Devise 进行身份验证,使用 CanCan 进行授权。
到目前为止,我打开了 WebDav 并且工作正常。是否可以使用 Devise 登录名/用户和 dav4rack 来启用/限制对 WebDav 上某些文件/目录的访问?也许已经有相关的说明或维基页面了?任何帮助将不胜感激。
附言。这是解决此类问题的正确方法吗?也许我应该切换回 apache mod_dav 并将 apache 的 dav 用户/组与我的 Rails 应用程序中定义的用户/组同步?
I would like to enable WebDav for Rails 3.1 application, where I use Devise for authentication and CanCan for authorization.
So far I turned on WebDav and works fine. Is it possible to use Devise logins/users with dav4rack to enable/restrict access to certain files/directories on WebDav? Maybe there is already a howto or wiki page about that? Any help will be appreciated.
PS. is this the right way of solving this kind of problem? maybe i should switch back to apache mod_dav and synchronise apache's dav users/groups with users/groups defined in my Rails application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在这里找到了一个带有 Dav4Rack 资源的 Devise 示例
https://github.com/bryanrite /dav4rack-example-devise-subdirectories/blob/master/app/models/my_resource.rb
在我的例子中,我使用电子邮件而不是用户名。
I found an example of Devise w/ a Dav4Rack resource here
https://github.com/bryanrite/dav4rack-example-devise-subdirectories/blob/master/app/models/my_resource.rb
In my case, I used email instead of username.