What is the best way to add multiple role access to a Gollum wiki?
I understand how to add Basic HTTP auth via, Rack middleware. However, I would like to know what's required to have full multi user/role authentication and authorization.
Can Devise or OmniAuth be used in a similar way to a Rails app?
What is required?
With this hint http://www.sinatrarb.com/faq.html#auth my configuration file like this
# authentication.rb
module Precious
class App < Sinatra::Base
use Rack::Auth::Basic, "Restricted Area" do |username, password|
[username, password] == ['admin', 'admin']
end
end
end
and running as:
$ gollum --config authentication.rb
In the running gollum instance, it will ask for user name and password
There's also the omnigollum project (https://github.com/arr2036/omnigollum) to support omniauth with gollum.
I found a basic http-auth extension here: https://gist.github.com/2224709
Leaving this here for anyone interested: Using vigntom's method, I made a repo with basic auth added in for Gollum, ready to go. I put credentials in a yaml file to keep them from being hard coded in the repo.
https://github.com/mrchameleon/precious
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With