README.md in gollum-auth-0.2.0 vs README.md in gollum-auth-0.3.0
- old
+ new
@@ -1,17 +1,19 @@
# Gollum::Auth - Authentication Middleware for Gollum Wiki
[![Gem Version](https://badge.fury.io/rb/gollum-auth.svg)](https://badge.fury.io/rb/gollum-auth)
[![Build Status](https://travis-ci.org/bjoernalbers/gollum-auth.svg?branch=master)](https://travis-ci.org/bjoernalbers/gollum-auth)
-`Gollum::Auth` is a Rack-Middleware to add
+[Gollum](https://github.com/gollum/gollum)
+is an excellent Wiki-software.
+But it does not include user authentication (on purpose).
+
+`Gollum::Auth` is a Rack-Middleware that add
[HTTP Basic Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication)
-to
-[gollum](https://github.com/gollum/gollum).
-This requires users to authenticate in order to change the wiki (create /
-edit / delete / rename / revert pages).
-Read-only access is permitted by default.
+to gollum.
+With this only authenticated users have access to your wiki.
+Optionally you can allow readonly-access for unauthenticated guests.
## Installation
Add this line to your application's Gemfile:
@@ -41,23 +43,26 @@
require 'rubygems'
require 'gollum/auth' # Don't forget to load the gem!
require 'gollum/app'
# Define list of authorized users where each must have a "name", "password"
-and "email":
+# and "email":
users = YAML.load %q{
---
- name: Rick Sanchez
password: asdf754&1129-@lUZw
email: rick@example.com
- name: Morty Smith
password: 12345
email: morty@example.com
}
-# Allow only authenticated users to access and change the wiki.
+# Allow unauthenticated users to read the wiki (disabled by default).
+options = { allow_guests: true }
+
+# Allow only authenticated users to change the wiki.
# (NOTE: This must be loaded *before* Precious::App!)
-use Gollum::Auth, users
+use Gollum::Auth, users, options
# That's it. The rest is for gollum only.
gollum_path = File.expand_path(File.dirname(__FILE__)) # CHANGE THIS TO POINT TO YOUR OWN WIKI REPO
wiki_options = {:universal_toc => false}
Precious::App.set(:gollum_path, gollum_path)