gemspec: update to latest gems versions

This bumps Rails to 4.0.0 (tests are currently broken).

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
devise: initial integration

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
cancan: initial integration

This also irons out the Devise integration:

* use the correct layout for the sign-in form
* implement the permissions check call to Kill Bill

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
cancan: hide various links based on permissions

No need to enforce them at the controller level since Kill Bill will
re-check the permissions.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
layouts: remove broken links from top menu

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Merge remote-tracking branch 'origin/master' into rbac

Conflicts:
	Gemfile.lock
	app/views/kaui/account_timelines/show.html.erb
	app/views/kaui/layouts/kaui_application.html.erb
	kaui.gemspec

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
cleanups: various UI bug fixes

* Use flash.now in renders to avoid keeping the message in the next request
* Switch from flash[:info] to flash[:notice] for consistency
* Fix redirect path error in CreditsController
* Add missing notice when destroying tag definitions
* Fix Multi-Tenancy/RBAC hack in killbill_helper
* Various small fixes: Kill Bill website url, placeholders, etc.
* Try to parse BillingExceptionJson in ErrorHelper (will be cleaner
  once we fully switch to the killbill client library)

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
rbac: pass users credentials to API calls

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
accounts: populate placeholder on failure

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
lib: get rid of error_helper

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
killbill_helper: mixing couple of calls after 72ab0a5d2

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
gemspec: update killbill-client-ruby to 0.2.0

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
sessions: integrate with Kill Bill sessions

After log-in, subsequent calls to Kill Bill are performed using
the session_id retrieved by the killbill-client library.

This also fixes various bugs in the Devise integration.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
models: add entitlement model

This is to support entitlement:* permissions.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
models: remove deprecated Kaui::ErrorHelper from account_email.rb

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
controllers: fix killbill_helper integration after 72ab0a5d2

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
devise: display custom message when Kill Bill is down

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
ability: interpret wildcards in permissions

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
test: fix tests integration with Devise and CanCan

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
gemspec: downgrade rails to 3.2.14

Now that the Devise/CanCan integration is done, downgrade to Rails 3.x.

Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>