Skip to content

Instantly share code, notes, and snippets.

@sakim
sakim / app.rb
Last active December 17, 2015 08:39 — forked from troelskn/app.rb
Gollum wiki access control. Modifications require authentication.
require 'gollum/app'
require 'digest/sha1'
class App < Precious::App
User = Struct.new(:name, :email, :password_hash)
before /^\/(edit|create|delete|livepreview|revert)/ do authenticate! ; end
helpers do
def authenticate!