cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yves Vindevogel <yves.vindevo...@implements.be>
Subject Re: Dynamic connection to the database
Date Wed, 05 May 2004 22:27:58 GMT

On 05 May 2004, at 13:56, Derek Hohls wrote:

> Perhaps "mixing" was the wrong word - I do understand
> what are trying to achieve- all I was trying to say is that you
> can use the sitemap to pass information on the currently
> logged-in user to the database.

How would I achieve that ?
With database actions ?

> You do not have to store
> the database login and ID in the Actor field if all you want to
> do is track which user is making the changes -

How would you achieve a per-record trace of who did what in the 
database ?
I see no other way that to store it in the record.

>  perhaps a
> user name/password table is one way of satisying both
> requirements

That is included, even with a type of login (customer, personnel, ...)

> - this has the advantage of not tying you to
> the specifics of authentication of that particular database.
> I think this is a better  approach than asking the database to
> do it; your comparison with the timestamp field is not really
> a valid one as the database does not need to know anything
> about the "external environment" to make this kind of entry...

I don't understand this.  The timestamp field is to see when updates 
where done on the database (and by who -> actor)

>
>>>> yves.vindevogel@implements.be 2004/05/05 12:05:26 PM >>>
> Not really mixing things ....
>
> This is the scenario:
> 1) user logs in (cocoon authentication used)
> 2) user enters data in a form (or updates data in a form) and submits
> 3) data is stored in database table with this structure (example)
>
> LastName  varchar(50)
> FirstName  varchar(50)
> ...
> Actor            varchar(50)
> TS (Timestamp)	datetime
>
> The field Actor contains the login used to insert, update or
> (logically) delete the record.
>
> I want to prevent that I need to add the "login" as a parameter to each
> function (stored procedure).
> If I create my connection, the database can tell the login that is
> used.  And it can fill out the timestamp for me.
> I do not need to pass those.
>
> Unfortunately, my connection in Cocoon is always defined with a fixed
> name.
> So even when I login with Cocoon Authentication, my database only knows
> one login: the one I specify in my conf. file.
>
>
>
> On 05 May 2004, at 11:42, Derek Hohls wrote:
>
>> Yves
>>
>> Are you not mixing two operations here; its the Cocoon
>> application that is making the DB connection - the people
>> who are using the that connection can be tracked and
>> logged separately (using various of the Cocoon authentication
>> methods.....).  One could, of course, set up different *types*
>> of connections in the config file, based on, say, read-only
>> access vs update-type access, but this is still different from
>> tracking the users.
>>
>> This separation also makes your application more flexible
>> and easier to maintain.
>>
>> Derek
>>
>>>>> yves.vindevogel@implements.be 2004/05/05 11:37:01 AM >>>
>> Hi,
>>
>> I need to keep track of who changes records in my database (I use
>> postgres).
>> I would like to make a connection to my database BUT always with a
>> different username / password.
>>
>> In my config file, this is a fixed thing.
>>
>> Is there a way to do this ?
>>
>>
>> Met vriendelijke groeten,
>> Bien à vous,
>> Kind regards,
>>
>> Yves Vindevogel
>> Implements
>>
>>
>>
>> -- 
>> This message has been scanned for viruses and
>> dangerous content by MailScanner, and is
>> believed to be clean.
>> MailScanner thanks transtec Computers for their support.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> MailScanner thanks transtec Computers for their support.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message