search for: rolename

Displaying 6 results from an estimated 6 matches for "rolename".

2010 May 07
1
Apache Tomcat/5.5.23
...of the test webapp users ability to restart tomcat. According to the home page, users are defined in $CATALINA_HOME/conf/tomcat-users.xml. Currently my file has the following content more tomcat-users.xml <?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="tomcat"/> <role rolename="role1"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1&qu...
2008 Jun 03
1
after_create callback in subclass
I have a User model with a protected method defined: def set_role(rolename) role = Role.find_by_rolename(rolename) permission = Permission.new permission.role = role permission.user = self permission.save(false) end and a subclass with: after_create set_role(''client'') This always fails for me with the error: undefined method...
2009 Jan 27
2
Login form_tag with select_tag option
Hi all, In the application i develop, a sophisticated login system is required. Being a newbie in Ruby, i''m not comfortable with the select tag in the form tag. My requirement: 2 tables - User(LoginName, Password, RoleId...) and Role(RoleId, RoleName...) View - RoleNames to be loaded in the drop down box and On submit, RoleId to be passed to controller for authentication. My Code Snippet: #Controller if request.post? and params[:login] @user = User.new(params[:login]) validUser = User.find(:first,:conditions => ["login_...
2008 Sep 08
0
uninitialized constant error with restful authentication
...stful authentication with Rails 2.1.0 on Mac OS X Leopard, and I had to comment out RAILS_GEM_VERSION in the environment file to install the plugin from technoweenie. Now I''m trying to follow along in a tuturial, and I''m stuck on this: 1. $ ruby script/generate scaffold Role rolename:string 2. /Library/Ruby/Gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:492:in `const_missing'': uninitialized constant User::Authentication (NameError) 3. from /Users/naijaguy/Sites/rails_apps/testauthapp/app/models/user.rb:4 4. from /Library/Ruby/Gems/1.8...
2006 Dec 08
19
HABTM join table quirk
.... (Changes for our environment were added..but are minor.) Since I initially let Rails create the join table between two data tables with a HABTM relationship....I assumed it would know HOW to do it correctly. Oh well...maybe not. My tables looked like this: Rights ID name Roles ID rolename Rights_Roles ID right_id role_id The ID field is basically unneeded since this table is only for the many to many relationship. I was getting a problem when trying to add a second record to the table. It turns out the HABTM relationship was adding one of the foreign keys as the ID fiel...
2007 Aug 11
2
Rspec and acl_system2 plugin
Hello, I''m trying to spec a Rails application using the couple restful_authentication/acl_system2 plugins. In my admin layout, I put the following code : <% restrict_to "admin" do -%> <ul id="admin-tabs"> <li> /users Users management </li> </ul> <% end -%> Then in my spec file