Reputation: 342
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?
Upvotes: 19
Views: 8022
Reputation: 171
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
Upvotes: 17
Reputation: 21
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
Upvotes: 1
Reputation: 4859
There's also the omnigollum project (https://github.com/arr2036/omnigollum) to support omniauth with gollum.
Upvotes: 6
Reputation: 432
In this thread
https://github.com/gollum/gollum/issues/107
one of the Gollum developers gives some hints. No known fork / project yet it seems.
Upvotes: 0
Reputation: 117615
I found a basic http-auth extension here: https://gist.github.com/2224709
Upvotes: 2