I am trying to allow users with role "corporate" to access their own company. Currently a user with that role gets blocked.
If i login as admin or change the access control to allow all, it works fine. The issue is pertaining to Corporate user role having a company.
here is all the code http://pastie.org/672733
User controller
class...
Hello,
I'm pretty new to rails and it's the first time I'm actually using authlogic + acl9. I followed the default installation steps for both plugins.
So far everything works great, but I have trouble to find an elegant solution for this problem:
Let's say I have a model class called Products. When creating a new Product object I ass...
So for whatever reason this plugin will not maintain a role if there are no users added to it. A role whose last user is removed gets removed from the roles. Is there a workaround for this?
...
Hi guys,
I am ramping up Cucumber, and I am having a issue getting one of my first tests to pass. The exception I am getting is:
And I visit the new contract screen
Acl9::AccessDenied (Acl9::AccessDenied)
/usr/local/lib/ruby/1.8/benchmark.rb:308:in `realtime'
(eval):2:in `visit'
./features/step_definitions/manage_contracts_ste...
I'm trying to create a Rails form that allows an admin user to change the assigned roles of other users. The form I've created registers changes to the user (such as password or login changes), but doesn't register changes to the user's role, which is a separate model.
I'm using Acl9 for role-based authentication, which uses a User ...
I think in something like this:
def self.obj_list(opts = {:include => [] , :exclude => []})
# Returns an array with all objects with roles applied
# +:exclude+:: (array,string) optional object type to exclude from list
# +:include+:: (array,string) optional object type to include in list
# Example:
# Role.obj_list(...
I am using acl9 on top of authlogic on one of my projects. I like the approach acl9's approach but I guess I am trying to do something that is just not that simple (not to say impossible).
For reasons of usability I would like to have an inline admin panel. So for example say I got a resource auction and a nested resource auction/bid. W...
Hi,
I am using Acl9 to manage the roles and I want to hide the checkbox usertype if the user has the role :customer and show it if the role is :manager. I want that just the :manager can edit all the fields and some for the :customer.
Thank you for your help!
<h1>Editing user</h1>
<% form_for(@user) do |f| %>
<%= f.error_messages %...
I have a user model which is access controlled by ACL9
in userscontroller:
ACL9 related stuff
before_filter :load_user, :only => [:show]
access_control do
allow :owner, :of => :user, :to => [:show]
end
def load_user
user = User.find(params[:id])
end
in ApplicaitonController
I have a
rescue_from 'Acl9::AccessDenied', :with => ...