similar to: authorization framework?

Displaying 20 results from an estimated 2000 matches similar to: "authorization framework?"

2006 Feb 23
13
Check if a saved user''s name is admin
Hi all, I have a question about this method in my User model: # Returns true for the (saved) user called "admin" def is_the_administrator true if save and name == "admin" end The method returns true if the user''s name is admin. However, I only want to return true if the state of the object is "saved", so I call the save method first. I''m
2006 Apr 28
2
["acts_as_authenticated"] << "Role-Based Authorization Rails Recipe"
hi guys, has anyone here implemented role based authorization from rails recipes into acts_as_authenticated ? how''s it going? Case: there is ONE admin. And MANY users. Admin is the only one who can create, edit, delete user, etc.. users also need to login, but go to different pages. do you guys think it''s good to try rick''s acts_as_authenticated + chad''s
2006 Feb 27
3
Send parameter along with method in before_filter
Hello list, I have an app that has a very simple authorization scheme. A person can have many roles and roles can have many people. In my app, I''d like to do before_filter :login_required (since no role name is provided, it accepts any users with credentials) before_filter :login_required ("administrator") (only accepts those with role administrator) before_filter
2006 Feb 23
20
ActiveRbac 0.3 release - We''re now on Engines
Hi I have just released the 0.3 revision of ActiveRecord - make sure to get the fresh, hot packages from https://activerbac.turingstudio.com/releases What is ActiveRBAC? ------------------- ActiveRBAC is a Ruby on Rails library that provides a full stack RBAC (Role Based Authorization) system with user, group, role and permission management. It provides models and controllers to edit
2006 Apr 17
2
newbie before_filter question
I''ve successfully gotten acts_as_authenticated working. Currently the before_filter line for my admin screen is like this: class AdminController < ApplicationController include AuthenticatedSystem before_filter :login_required Only issue I have now is that anyone logged in can access that screen. I''d like to differentiate between a regular user and
2006 Apr 22
4
Slice and dice plugin
I''ve been playing around with some easier ways of specifying conditions in active record, and have come up with a little plugin that some may find useful. Currently active record finder and calculations methods can take a :conditions option with a string or array listing some sql conditions, eg: Animals.find :first, :conditions => "name = ''Tiger''" My
2006 Feb 20
6
LoginGenerator - multiple user types...
I have been looking at the LoginGenerator gem. Looks great and can be easily modified. However in my app I have two places where people can login, one is for in my case "employees" the other is for "users". They are seperate tables in my database and have many different fields. I have an admin area located at ./sysadmin/ where only "employees" can login, they
2006 Jul 16
9
acl_system help is needed
i found Ezra''s acl_system plugin yesterday and i am trying to figure it out. based on the simple instructions on the site, it does exactly what i need but i''m getting some errors when i try to use it: NoMethodError in UsersController#index You have a nil object when you didn''t expect it! The error occured while evaluating nil.roles i am pretty new to rails and
2006 Nov 01
17
So how can I rewrite my app without using with_scope?
So, I hear that with_scope is going to be deprecated. Which is a bit of a shame, given the stuff I''ve been writing recently. I have a CMS with multiple clients. A ''client'' is essentially a company, with multiple users. Content on the site belongs to a client - content could be messages, images, schedules, etc etc. People belonging to one client should not be able
2006 Jul 14
5
Acts_As_Taggable Plugin multiple controllers.
I have Acts_As_Taggable Plugin working. I have a HR controller and a sales controller. I have a document in hr tagged whitepaper and a differnent document in sales tagged whitepaper when I am in hr I see the hr document tagged with whitepaper and not the sale document (what I want). but if I click on the tag whitepaper I return two documents, hr and sales. I just want to return the hr document
2006 Mar 06
20
How painful is the 1.0 -> 1.1 upgrade going to be?
Does anyone have a sense for how painful the 1.0 -> 1.1 upgrade is going to be for existing apps? I''m finishing up my first real RoR application with Rails 1.0. I can live with it staying at that level, but I really want to use the has_many :through attribute to clean up some of my code. I''m not particularly interested in edge Rails, mainly because the documentation for
2007 Oct 18
9
with_scope issue
I have the following code: class User < ActiveRecord::Base has_many :requests do def find_active(options = {}) with_scope :find => { :conditions => ["requests.active = ?", true] } do find(:all, options) end end end end Executing user.requests.find_active results in the following SQL: SELECT * FROM requests WHERE (( requests.user_id = 10 ) AND (
2006 Apr 01
1
STI with_scope on parent - bug or feature?
Hi, It seems that setting a with_scope on the parent class doesn''t do anything MyClass.with_scope(:find=>{:conditions=> ["somecol = ?", ''val'']}) do @ext_pages, @ext_rows = paginate :my_extended_class, { :per_page => 13 } end # this doesn''t generate WHERE somecol=''val'' In order for scope to work you have to call
2006 Mar 22
4
Problem with ACL plugin system
Don''t know if anyone else has experienced this but I''m having a problem with the access_denied method in Ezra''s ACL access control plugin. It''s working fine (in conjunction with acts_as_authenticated) until it comes across a user it denies access to, in which case it throws the following error: NoMethodError in Admin#index protected method
2007 Aug 21
3
Eager Loading
is there a way to always eagerly load an associated object so that you don''t have to put :include into every finder? class Product <ActiveRecord::Base belongs_to :user #always load user when product is loaded end Product.find(1).user.login #1 query since user was loaded with the product, same as if i used :include but I don''t want to have to specify it everywhere.
2006 Sep 08
1
has_many relationship extensions and scoping rules
Hi all ! Is this supposed to work ? class Email < ActiveRecord::Base has_many :to, :class_name => 'Recipient', :conditions => "recipients.source = 'to'" do def create!(*args) with_scope(:create => {:source => 'to'}) do super end end def build(*args) with_scope(:create => {:source => 'to'}) do
2006 Nov 21
2
Accessing scopes
If with_scope has been called previously, how do I access the find conditions dynamically? I am asking because I am using a find_by_sql call (which clobbers the with_scope). How can I access the method scoping so that I can read it and incorporate it into my query manually? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google
2006 May 02
3
Writing tests for plugins
I''ve been googling around trying to find some tips on creating tests for plugins. Am I correct in assuming that I''d have to have the tests as part of a rails app in order to test the plugin? I''d like to find a way to do standalone tests for the plugin. -- Posted via http://www.ruby-forum.com/.
2006 Jul 23
4
Anything like with_scope for ActionController?
There are areas of my application that "want" to use a url structure like domain/<human_readable_param>/<Module>/<Controller>/<Action>/<Id> Please note that the human readable parameter I need to inject is NOT related to the <id> being used by the action/controller pair. It''s identifying a container object whose contains are operated
2010 Dec 16
12
Capybara + radio buttons
How do I select a radio button when both id and name are identical?: <input type="radio" name="BILFPB.bilPremieUppgifterFI.under24" tabindex="13" value="J24" checked="checked" id="forare">Ja <input type="radio" name="BILFPB.bilPremieUppgifterFI.under24" tabindex="14" value="N24"