search for: permission_id

Displaying 7 results from an estimated 7 matches for "permission_id".

2006 Aug 07
0
question/problem with habtm and "include?"
...to determine whether a user has access to a particular permission: if session[:user].role.permissions.include?(''Lead List'') do something end If I call session[:user].role.permissions.inspect I get this: [#"Lead List", "role_id"=>"1", "permission_id"=>"1", "id"=>"1"}>, #"Purchase Orders", "role_id"=>"1", "permission_id"=>"4", "id"=>"4"}>, #"Quotes", "role_id"=>"1", "permission_id&...
2009 May 20
1
[PATCH server] don't add nil key to failures hash for PartialSuccessError handling.
..._controller.rb +++ b/src/app/controllers/permission_controller.rb @@ -51,7 +51,7 @@ class PermissionController < ApplicationController successes << @permission # PermissionError and ActionError are expected rescue Exception => ex - failures[@permission.nil? permission_id : @permission] = ex.message + failures[@permission.nil? ? permission_id : @permission] = ex.message end end unless failures.empty? @@ -72,9 +72,7 @@ class PermissionController < ApplicationController successes << @permission # PermissionError expecte...
2006 Mar 07
12
rjs and partials
I''m trying to update a list, and having a hard time applying visual effects to the latest element created. Here is what I''m doing. =========================================== 1) Creating an "item" via an action, then rendering the RJS template 2) RJS template looks like this: page.insert_html :top, ''items'', :partial =>
2012 Jan 18
2
Polymorphic and standard association issue
...ind(1) @user.roles << Role.create({:role => 100, :user_id => @user.id}) Rails.logger.info @user.roles.inspect ================================ ...returns nothing. I''m very confused here. My roles table has --------------------------------------------------- | id | user_id | permission_id | permission_type | --------------------------------------------------- | 1 | 1 | NULL | NULL | --------------------------------------------------- If anyone can help me out I''d greatly appreciate it. Environment: -------------- Ruby: REE Rails: 3.1.2 Passenge...
2006 Jul 25
0
Errors logged but not returned to browser, WEBrick hangs
...t;=>"admin"} required_perm is admin/edit Permission Load (0.000000) FROM permissions, roles, permissions_roles, users_roles, users WHERE users.id = 4 AND users.id = users_roles.user_id AND users_roles.role_id = roles.id AND roles.id = permissions_roles.role_id AND permissions_roles.permission_id = permissions.id AND permissions.controller = ''admin'' AND permissions.action = ''edit'' Cmaform Load (0.000000) SELECT * FROM cmaforms WHERE (cmaforms.id = ''11'') LIMIT 1 NoMethodError (undefined method `for_this_agent'' for #<A...
2005 Dec 09
7
UserEngine - rake bootstrap aborted
Hi there, I''ve just installed login_engine and user_engine from the repositories, followed the setup procedures as documented in: vendor/plugins/user_engine/README But I''m getting the following failure: vince@vaio:~/Projects/Booking$ rake bootstrap (in /home/vince/Projects/Booking) rake aborted! undefined method `edit'' for class `UserController''
2009 May 18
0
[PATCH server] fixed functional tests after recent controller refactoring and managed node controller fixes.
...rmission_controller_test.rb index f5aa4a9..0885890 100644 --- a/src/test/functional/permission_controller_test.rb +++ b/src/test/functional/permission_controller_test.rb @@ -64,16 +64,17 @@ class PermissionControllerTest < Test::Unit::TestCase def test_destroy post :destroy, :id => @permission_id - assert_response :redirect - assert_redirected_to :controller => 'hardware', :action => 'show', :id => pools(:default).id - assert_equal "<strong>ovirtadmin</strong> permissions were revoked successfully" , flash[:notice] + + assert_respon...