Hi Frank,

Sometimes doing what your doing is the only way to do meet the requirements...

BUT

What Jesse said is right 99% of the time. This sounds more appropriate for the 
Controller level of MVC, not the Model classes.

What if you have an application that uses the same Model but it doesn't have 
authentication, or even users? You are making your ability to read and write, 
or at the very least the way you read and write, to the DB dependent upon an 
implementation of a UI.

Sometimes it's okay, but it's always painting yourself into a corner. Sometimes 
it's okay to be stuck in a nice, safe, protected, Easily-Defended Corner Where 
THe PHantoms THAT haunt yOU CAN'T SNEAK UP ON YOU!!!!!

... er... um.. 

Where was I... 

Oh, yeah. But not often.

Dave

On Aug 16, 2011, at 11:15 PM, Frank Stock wrote:

> Thank you all and thank Kieran
> 
> ERXThreadStorage will do what I want to do!!
> 
> 
> regards,
> Frank
> Op 16-aug-2011, om 17:02 heeft Kieran Kelleher het volgende geschreven:
> 
>> Frank,
>> 
>> In your session awake, you can stuff the current session user's EOGlobalID 
>> (not the EO itself) into ERXThreadStorage. Then you can access that global 
>> id from anywhere, hydrate a user EO in whatever EC you are working and use 
>> it for qualifier's or whatever.
>> 
>> Regards, Kieran
>> 
>> 
>> On Aug 16, 2011, at 10:26 AM, Frank Stock wrote:
>> 
>>> I have never used it but is this something I can put in the 
>>> ERXTreadStorage? So I can get it from ERXGenericRecord?
>>> Op 16-aug-2011, om 15:43 heeft Jesse Tayler het volgende geschreven:
>>> 
>>>> maybe just create a session variable for your authenticatedUser and set 
>>>> that with a login method.
>>>> 
>>>> in another method for accessing the data, check if the 
>>>> session.authenticatedUser exists, and whatever you want before retuning 
>>>> data from table B.
>>>> 
>>>> 
>>>> 
>>>> On Aug 16, 2011, at 9:39 AM, Frank Stock wrote:
>>>> 
>>>>> Hi all,
>>>>> 
>>>>> 
>>>>> How can I solve this:
>>>>> 
>>>>> I have a table A and a table B. If I fetch an object from A, I want an 
>>>>> object from B depending on the user that has logged in.
>>>>> So I want to add an method in de Class A that is fetching the object from 
>>>>> B, but where can I get the user-information?
>>>>> 
>>>>> It is like the use of ERXLocalizer where you get the column in the 
>>>>> language you want, but I want the get a relation B, depending on the user 
>>>>> information.
>>>>> 
>>>>> Or where can I find more info about the working of 'user info' in the 
>>>>> modeler.
>>>>> 
>>>>> Thanks in advance,
>>>>> Frank Stock
>>>>> Belgium _______________________________________________
>>>>> Do not post admin requests to the list. They will be ignored.
>>>>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>>>>> Help/Unsubscribe/Update your Subscription:
>>>>> http://lists.apple.com/mailman/options/webobjects-dev/jtayler%40oeinc.com
>>>>> 
>>>>> This email sent to jtay...@oeinc.com
>>>>> 
>>>> 
>>> 
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
>>> Help/Unsubscribe/Update your Subscription:
>>> http://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com
>>> 
>>> This email sent to kelleh...@gmail.com
>> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com
> 
> This email sent to webobje...@avendasora.com
> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to