Jos*_*itt 19 git wiki gollum-wiki
添加多个角色访问权限到Gollum wiki的最佳方法是什么?
我了解如何通过Rack中间件添加Basic HTTP auth.但是,我想知道完整的多用户/角色身份验证和授权需要什么.
可以使用与Rails应用程序类似的方式使用Devise或OmniAuth吗?
需要什么?
小智 17
有了这个提示http://www.sinatrarb.com/faq.html#auth我的配置文件是这样的
# authentication.rb
module Precious
class App < Sinatra::Base
use Rack::Auth::Basic, "Restricted Area" do |username, password|
[username, password] == ['admin', 'admin']
end
end
end
Run Code Online (Sandbox Code Playgroud)
并运行为:
$ gollum --config authentication.rb
Run Code Online (Sandbox Code Playgroud)
在运行的gollum实例中,它将询问用户名和密码
在这个线程中
https://github.com/gollum/gollum/issues/107
咕噜开发者之一给出了一些提示。似乎还没有已知的分叉/项目。
归档时间: |
|
查看次数: |
7511 次 |
最近记录: |