markpercival / simple_admin
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
059caa0
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Mon Nov 02 22:02:00 -0800 2009 | |
| |
README.markdown | Tue Nov 10 09:15:18 -0800 2009 | |
| |
Rakefile | Mon Nov 02 22:02:00 -0800 2009 | |
| |
app/ | Thu Nov 05 07:13:27 -0800 2009 | |
| |
config/ | Mon Nov 02 22:02:00 -0800 2009 | |
| |
doc/ | Mon Nov 02 22:02:00 -0800 2009 | |
| |
init.rb | Thu Nov 05 07:13:27 -0800 2009 | |
| |
lib/ | Thu Nov 05 07:13:27 -0800 2009 | |
| |
log/ | Mon Nov 02 22:02:00 -0800 2009 | |
| |
public/ | Mon Nov 02 22:02:00 -0800 2009 | |
| |
test/ | Thu Nov 05 07:13:27 -0800 2009 |
README.markdown
Simple Admin
A database-less admin authentication based on OpenID
Requires the following gems
- ruby-openid
- rack-openid
Installation
Install the plugin
script/plugin install git://github.com/markpercival/simple_admin.git
Add the following before filter to any protected controllers
before_filter :ensure_admin
List the authorized OpenId's in 'config/simple_admins.yml'
- markpercival.us
- mark.squarepush.com
When you login you should see this

The following helpers are available in your controller and views:
- current_user - returns the current authenticated user
- authorized? - tells you whether or not the current session is authenticated
