Gollum的强大访问控制?

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实例中,它将询问用户名和密码


jos*_*son 6

还有omnigollum项目(https://github.com/arr2036/omnigollum)用gollum支持omniauth.


Tob*_*eke 0

在这个线程中

https://github.com/gollum/gollum/issues/107

咕噜开发者之一给出了一些提示。似乎还没有已知的分叉/项目。

  • 虽然这从理论上可以回答这个问题,但[最好](​​http://meta.stackexchange.com/q/8259)在此处包含答案的基本部分,并提供参考链接。 (3认同)