On Tue, Jun 17, 2008 at 11:06 AM, Ed Leafe <[EMAIL PROTECTED]> wrote:

> On Jun 17, 2008, at 11:53 AM, Paul McNett wrote:
>
> >> public Address GetAddress(Guid addressId)
> >>        {
> >>            //Verfiy Validity of arguments
> >>            if (addressId == Guid.Empty)
> >>            {
> >>                InvalidArgumentFaultDetail.ThrowException("addressId",
> >> "addressId cannot be null.");
> >>            }
> >>
> >>            //Get the current user
> >>            UserIdentity user =
> >> ((UserIdentity)ServiceSecurityContext.Current.PrimaryIdentity);
> >>
> >>            //Run the query
> >
> > Pardon me, but *yuck*!
>
>
>         Just what I was thinking. I much prefer:
>
> import securityContext
> def getAddress(addressID):
>        if not addressID:
>                raise ValueError, "Address ID cannot be null"
>        user = securityContext.currentUser.primaryID
>        # Run the query
>
> ------


Unfortunately the securityContext. is what we wrote to identify our outside
customers instead of our networked users.

This line (UserIdentity)ServiceSecurityContext.Current.PrimaryIdentity
is a semi mega method to define what you are ALLOWED to interact with.  It
is not just a guid but an object that is strictly typed.

-- 
Stephen Russell
Sr. Production Systems Programmer
Mimeo.com
Memphis TN

901.246-0159


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to