Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Group info
Language: English
Group categories:
Computers > Programming
More group info »
Discussions
View:  Topic list, Topic summary Topics 1 - 10 of 335  Older »

You cannot post messages because only members can post, and you are not currently a member.
Description: Declarative Authorization Rails Plugin
http://steffenbartsch.com/blog/2008/09/d elclarative-authorization
http://github.com/stffn/declarative_auth orization
http://github.com/stffn/decl_auth_demo_a pp
 

permitted_to?(:action, @object.proxy_reflection) builds an object and pollutes the space. 
  Given: Class Person ... has_many :phone_numbers, :through => :person_phone_numbers end With a view Before call: <%= @person.phone_numbers.length %> <% permitted_to? :edit, @person.phone_numbers do %> After permitted_to? <%= @person.phone_numbers.length %> <% end %> I get this as output:... more »
By dgm  - May 25 - 2 new of 2 messages    

Passing a user object to permitted_to? 
  (continuing this discussion from a private e-mail) I'm implementing a custom helper that lets me see if the current user is impersonating another user (for administrative purposes). I know I can called permitted_to? in a helper, but permitted_to? does not seem to accept a user object or check against anything besides... more »
By Christopher Thielen  - May 21 - 1 new of 1 message    

New release with Development fixes in master? 
  Steffen, Do you have* a timeline or a list of what else you want fixed/added before you roll out a 0.5.6 release? I have a few new projects that I'm going to be using decl_auth in and would like to have specifically the development reload fixes already in master to be usable for the development team.* (and... more »
By Edward Rudd  - May 10 - 1 new of 1 message    

Devise login and current_user 
  I am having trouble getting Devise login to work. When the form is posted, my before_filter in application_controller.rb assigns Authentication.current_user = current_user. Since current_user is not set at this point (as the login has not happened), it uses guest permission throughout the request, even though current_user is soon set.... more »
By Peter Hamilton  - May 8 - 18 new of 18 messages    

Select single column while using with_permissions_to(:read)? 
  Hi there, I'm trying to figure out how to select only a single column in conjunction with using with_permissions_to. It always selects all columns from all the tables involved in the authorization check. Does anyone know if this is possible? Here is what I am trying: MyObject.with_permissions_to(: read).select(:common_descripti on)... more »
By wgrrrr  - May 3 - 1 new of 1 message    

order of rules when using includes 
  Take the example of an admin user vs. a guest user. for the guest i have the rule: has_permission_on :conditions, :to => [:new, ... if_permitted_to :read, :experimental_conditions end has_permission_on :experimental_conditions, :to => [:new, ... if_attribute :well_id => is { nil }... more »
By Brad Langhorst  - Apr 30 - 1 new of 1 message    

Authorization::AuthorizationUs ageError on nested models 
  I have constructed this nested structure where cobrands have companies and companies have users. I have established the following roles: site_admin, cobrand_admin, company_admin and user. class Cobrand < ActiveRecord::Base has_many :companies has_many :users, :through => :companies class Company < ActiveRecord::Base... more »
By Matt  - Apr 15 - 1 new of 1 message    

exists instead of inner join? 
  I need to set permission on an object based on whether a there exists an object in a has many relationship with a specific property value. has_permission_on :conditions, :to => [:new, ... if_permitted_to :read, :experimental_conditions #if_attribute :experimental_conditions =>{ :well_id => is { nil }}... more »
By Brad Langhorst  - Apr 10 - 1 new of 1 message    

Granting permission to a model w/o reverse relationship definitions 
  Here is the scenario. class Facility < ActiveRecord::Base belongs_to :address belongs_to :classified_address, :class_name => 'Address' end class Address < ActiveRecord::Base ...end The question How do I grant access to manage the addresses that are associated with the facility? Putting has_many on the address seems very... more »
By Edward Rudd  - Mar 29 - 1 new of 1 message    

"Permission denied" in rspec but working fine in development 
  Hi, I tried to test my application using rspec but ran in some trouble with "Permission denied" errors although the resource should have been accessible even with the :guest role. In the real application (in development env) everything works as expected. The test logfile shows the error message:... more »
By udo.eisenbarth  - Feb 26 - 3 new of 3 messages    

1 - 10 of 335   « Newer | Older »

XML       Send email to this group: declarative_authorization@googlegroups.com