ActiveAdmin ACL - ruby-on-rails

I'm new to Ruby on Rails and one of the things that I like is the admin generator bundles like RailsAdmin ActiveAdmin etc.
In my next project I'd like to use Ruby on Rails 3 and ActiveAdmin as backend. But I have no idea of how to achieve ACL in ActiveAdmin.
Can someone explain or point me in the right direction please?

Active Admin uses the Devise gem for authentication. The Devise team have a wiki on how to use cancan for authorization here https://github.com/plataformatec/devise/wiki/How-To:-Integrate-with-CanCan-for-roles-management

ActiveAdmin has rather poor support for authorization in my opinion. If you want integrated CanCan then I recommend going with RailsAdmin. It unfortunately is not as customizable as ActivAdmin though.

Related

Use of Admin using Devise gem over Cancan

How to use admin role using devise gem.
Can we same controller for admin and users using devise gem.
In Cancan we can use same controller for all roles.
Which gem is good for admin releated aspects.
Anyone tell me example of admin aspects using devise gem.
I recommend using ActiveAdmin Or RailsAdmin. Both of them have nice ways to use cancan. If you confused about whether to use then decide by evaluating the following :
If you think you dont want to give that much effort and you need only CRUD staffs then use RailsAdmin.
Otherwise Use ActiveAdmin

Disqus SSO + RAILS Devise Gem

I'm trying to implement Disqus SSO with Rails.
I've built an app using Devise, but cannot figure out what to do with the sso code found on the Disqus API recipes. All of the documentation seems to be focussed on PHP, not Ruby.
Where is the correct place to use this function with Rails + Devise?
https://github.com/disqus/DISQUS-API-Recipes/tree/master/sso/ruby
I'm fairly new to ruby, but cannot find other resources on this topic.
I think u can use devise_cas_authenticatable gem
https://github.com/nbudin/devise_cas_authenticatable
hope top help you

Devise and cancan examples working with ember js

I use ember js + rails. I wanna to make user authorisation like Devise + Cancan in Rails. All i need is 2 roles : user and admin and i want to implement role and authentication controlling in ember js. All manuals that i found where very old. Mb you can give me some examples of app where such things are done?
Thanks for help.
Check out this blog post. It goes over how to use devise and emberjs. Not sure how the cancan would work on the client side, you'd have to come up with your own logic to do that.

Rails: Roles/admin

Prefface
I'm new to rails & programming. Working on my first rails app--I have authentication with omniauth and devise and a simple article submission working for users.
I want to do two things:
If a user isn't a specific role,
reroute them to another page.
If a preference is 'offline' only
allow admins to view the site.
I have yet to create a prefferences table--looking for suggestions. :)
What's the best way to set up simple roles?
What's the easiest way to redirect users if they're not admin and if the site is 'offline'?
I'm currently using CanCan for role-based authorization on my current project. I've found it works great including the ability to do both of what you're looking for. And the documentation! Oh, the documentation. If all gem authors wrote documentation like CanCan's, I do believe it would bring about world peace.
And as an added bonus, because it was written by Ryan Bates, it has a RailsCast already recorded for it.

Is there a Rails admin interface that supports MongoDB and Devise?

I recently switched to MongoDB and I am wondering if I can continue using any of the popular admin interface solutions, such as ActiveScaffold and Typus?
You can try Rails Admin:
a Rails engine that provides an easy-to-use interface for managing your data.
Features
CRUD any data with ease
Custom actions
Automatic form validation
Search and filtering
Export data to CSV/JSON/XML
Authentication (via Devise or other)
Authorization (via CanCanCan or Pundit)
User action history (via PaperTrail)
Supported ORMs
ActiveRecord
Mongoid
ActiveAdmin https://github.com/gregbell/active_admin is a great tool for the admin interface creation. And I believe sooner or later they add mongoid support.
Right now there's some patch for it: https://github.com/ebeigarts/mongoid_active_admin_app
I didn't try it myself though.
if your using Mongoid as your ORM, then active_admin should do the job.. apply this patch to get it working
this disables some functionalities (mostly filters because active_admin relies on meta_search and that gem only supports active_record)
Fixes ActiveAdmin sorting
Disables ActiveAdmin Filters/Search
Disables ActiveAdmin Comments
I think you'll find this page on MongoDB's site to be the best help:
http://www.mongodb.org/display/DOCS/Admin+UIs
There are many admin applications available, some in browser, some fat client, etc. that you can use for admin and maintaining your Mongo backend.
I am a .Net programmer so I have used only MongoVUE, but one that caught my eye that I might check out and it should be platform agnostic is JMongoBrowser
I'd bet plenty options will work with a RAILS setup.

Resources