Displaying 3 results from an estimated 3 matches for "webadmincontrol".
2006 Apr 18
2
Connecting to multiple databases with multiple database users
...ion arises on the set of tables that can be accessed as both
webadmin and customer. I see the following possibilities: (When i say
"default the connection to ..." I mean following the above mentioned
rails recipe)
1) Default the connection of those tables to a customer connection. In
the WebadminController action performing the "webadmin-only"
operations, remember the old connection and manually change it to the
webadmin connection by calling establish_connection. Perform the
"webadmin-only" operations. Change the connection back to the old one
2) Same scenario as 1 but vice v...
2006 May 10
8
dynamic setting of username and password in database.yml
Hello
I''ve now read a lot about application-level authentication in Rails, but 
I need to do database-level authentication.
The reason is that my database needs to have the current_user (database 
current_user, not current_user defined in an ActiveRecord Model) set to 
execute triggers for automatically updating audit tables. So it is not 
enough to have a session check against a User
2006 Apr 18
7
Connecting to multiple databases
..."webcaadmin_sandbox_#{RAILS_ENV}"
end
class Community < WebCaAdminSandboxBase
	# This causes the security features to be added to the model.
	include ModelSecurity
	
	belongs_to 	:user
	has_many	:communal_audits
	
	
	def initialize
	
		super
                #...
		
	end
	
end
class WebadminController < ApplicationController
	#scaffold	:community
	helper		:ModelSecurity
	
	model		:year,
				:community,
				:communal_audit,
				:ca_module,
				:ca_figure,
				:ca_question	
	public
	
	def new_community
	
		@community = Community.new
                # ....
	
	end
end
cheers
gamsl