Skip to content

Commit

Permalink
replaced this project with cream
Browse files Browse the repository at this point in the history
  • Loading branch information
kristianmandrup committed Sep 17, 2010
1 parent 02d4f25 commit ef346fe
Show file tree
Hide file tree
Showing 59 changed files with 10 additions and 2,240 deletions.
49 changes: 3 additions & 46 deletions Changelog.txt
@@ -1,47 +1,4 @@
June 25, 2010
----
Split off roles implementation into a set of *roles_for* gems for various ORMs.
Planning a role_groups gem for mongoid and mongo mapper to support grouping roles.

June 5, 2010
----
Have read up on RSpec and Testing Recipes. Will soon implement complete test suite using RSpec
Possibly also using: Cucumber, Null DB http://avdi.org/projects/nulldb/ and Not-a-mock http://github.com/notahat/not_a_mock

May 23, 2010
September 17. 2010
---
v.0.4.1

Fixed critical bug in config generator (issued raised by swistaczek).
Refactored generator code to be more DRY and flexible.

May 18, 2010
---
v.0.4.0

CanCan 1.1 support http://wiki.github.com/ryanb/cancan/upgrading-to-11

General:
* Configuration now done through AuthAssistant::Configuration, a singleton
* Fixed various bugs
* Tested that generators work for all strategies and that rails can start up after any generation!

Generators:
* Fixed various bugs
* Completed generators refactoring to ensure more elegant/generic and enhanceable generators solution
* Added generator strategy classes for each strategy with API for generation and reversal of the strategy

Permits:
* Now uses the new hash option for Permit 'ownership' (see owns function in Permit::Base)
* Added request as second argument to Ability and Permits permit? method to enable construction of more advanced permits (1)

(1) See 'request' example in http://wiki.github.com/ryanb/cancan/defining-abilities-with-blocks)

May 16, 2010
---
Support for standard roles
* admin (all)
* user (all)
* guest (default nil user)


Replaced this project with a new project called 'cream'.
See the README!
20 changes: 0 additions & 20 deletions LICENSE

This file was deleted.

155 changes: 7 additions & 148 deletions README.markdown
@@ -1,155 +1,14 @@
# Auth-Assistant

This project aims to assist you in setting up a complete user login and role permission system for your Rails 3 app.
It targets Devise as the user/login system and cancan as the permission system and my own role systems, all integrated in a powerful, yet flexible solution.
It targets [Devise](http://github.com/plataformatec/devise) as the Session system, [CanCan](http://github.com/ryanb/cancan) as the permission system and
[Roles](http://github.com/kristianmandrup/roles_generic) as the user Roles system.

## Status
The objective of this project is to
* Integrate all these subsystems in a powerful, yet flexible solution.
* Provide a generator that can auto-configure your Rails 3 app with these sub-systems for a given ORM

The current version should work as is. The permission system can be integrated nicely with the *roles* gems (see below).
Generators still need some work.
# Important update!

Considering renaming this project to 'cream'.
This project has been renamed and replaced with a new project called [Cream](http://github.com/kristianmandrup/cream)

## Session systems

Auth-Assistant targets [Devise](http://github.com/plataformatec/devise) as the Session system of choice (or Authentication/Authorization - a14n, a13n )

* [devise](http://github.com/plataformatec/devise)

## Roles

I have developed a flexible *Generic Roles* strategy system.

* [Generic Role Strategies](http://github.com/kristianmandrup/roles_generic)

Roles for popular ORMs

* [Roles for Active Record](http://github.com/kristianmandrup/roles_active_record)
* [Roles for DataMapper](http://github.com/kristianmandrup/roles_data_mapper)
* [Roles for MongoMapper](http://github.com/kristianmandrup/roles_mongo_mapper)
* [Roles for Mongoid](http://github.com/kristianmandrup/roles_for_mongoid)

_Role Groups_
Document DBs such as *Mongo* and *Riak* are good for modeling a role-group hierarchical relationship.
Role-Group support is planned as a future add-on for the roles strategies integration. (Any assistance appreciated!)

_Note:_
You are most welcome to provide "plugins" for any other role frameworks. Please follow the API conventions of Roles generic.

## Permission systems

There will be support for multiple permission systems:

* [CanCan](http://github.com/ryanb/cancan) - currently supported
* [Canable](http://github.com/jnunemaker/canable) - planned

_Note:_
You are most welcome to provide "plugins" for other permission frameworks.

## ORMs

In general, it should now finally be pretty easy to set up a Rails 3 app, with a full Session system, Permission system linked to a Role strategy system using any ORM. Devise supports the following ORMS:

* Active Record
* Data Mapper
* Mongo Mapper
* Mongoid

These ORMs are also supported for the Roles strategy system. The Permission system should not have any ORM dependency.
There are plans to create a top-level generator which sets up your project with all these systems for a given ORM.

## Installation and configuration ##

This gem has been designed for Rails 3 only.

### Install gems

Insert <pre>gem 'auth-assistant'</pre> in your Rails 3 Gemfile
<pre>$ bundle install</pre>

### Install as plugin

In the near future...

<code>rails plugin install http://github.com/kristianmandrup/auth-assistant.git</code>

## Role strategies ##

Role strategies can be set up using the [Generic Role Strategies](http://github.com/kristianmandrup/roles_generic) gem or any of the ORM specific roles gems such as [Roles for Active Record](http://github.com/kristianmandrup/roles_active_record).

_Future plans:_
I have plans to have the main *Auth-Assistant* generator configure a role strategy of choice for the ORM of choice.

## Permits

Currently only CanCan is supported as the permission system.

### CanCan

Role based authorization for [CanCan](http://github.com/ryanb/cancan) is setup by creating 'permits' for each kind of role.
A *permit* lets a user in a given role do certain actions.

The *config* generator generates a default <code>permits.rb</code> file which is placed in /lib, which you can edit to suit your needs.

### Canable

In [Canable](http://github.com/jnunemaker/canable) the permissions are by default defined in the models.
I plan to tweak this behavior to enable the same or a similar central permission setup as I use for CanCan.
My current branch of *Canable* contains generators to setup the models and user with a *Canable* config.
More to follow when I get further here...

## Generators

The following generators are currently available

* config - configure with new strategy
* views - generate partials for user action menu items

The *config* generator should automatically setup up your project with Devise, a Roles strategy of choice a Permission system of choice and all using an ORM of your choice!

Auth-Assistant will support these ORMs:

* Mongo Mapper
* Mongoid
* Data Mapper
* Acive Record

_NOTE_: Generators need more testing. The latest *generator-spec* and other supporting utils I've created should make it a breeze... ;)

Just updated the config generator, which is now called 'cream'. The goal is to make it setup appropriate gems in the project and run various generators to create a full, compatible integration of all the systems (devise, cancan, permissions and roles).
Testing of generators to be done ASAP.

### Config Generator ###

<code>rails g auth_assist_::config ROLE_STRATEGY [--devise] [--admin] [--orm]</code>

* --devise : run devise configure generator
* --admin : create admin user
* --orm : orm to be used

Example

<code>rails g auth_assist:config admin_flag --devise --admin --orm AR</code>

### Views Generator ###

Moves 'user menu' partials views into app/views/_user_menu

<code>rails g auth_assist::views [scope] [--haml]</code>

* scope : The scope folder under views to copy the partials to, fx 'admin'
* --haml : Use HAML as template language

## Note on Patches/Pull Requests ##

* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it. This is important so I don't break it in a
future version unintentionally.
* Commit, do not mess with rakefile, version, or history.
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
* Send me a pull request. Bonus points for topic branches.

## Copyright ##

Copyright (c) 2010 Kristian Mandrup. See LICENSE for details.
33 changes: 0 additions & 33 deletions Rakefile

This file was deleted.

1 change: 0 additions & 1 deletion VERSION

This file was deleted.

Binary file removed app/.DS_Store
Binary file not shown.
Binary file removed app/views/.DS_Store
Binary file not shown.
11 changes: 0 additions & 11 deletions app/views/auth_assist/menu/_admin_login_items.html.erb

This file was deleted.

11 changes: 0 additions & 11 deletions app/views/auth_assist/menu/_login_items.html.erb

This file was deleted.

10 changes: 0 additions & 10 deletions app/views/auth_assist/menu/_registration_items.html.erb

This file was deleted.

0 comments on commit ef346fe

Please sign in to comment.