Hello,
We are using the DBPSML and rely on the fallback logic to allow for
different role psmls based on different locales.  At first this appears to
work correctly, until the user attempts to access a psml not present for
that users locale.  The logic pulls the psml from a different locale
incorrectly allowing the user to see the profile.

Example:
PAGE                    MEDIA_TYPE      LANGUAGE        COUNTRY PROFILE
--------------- ----------      --------        ------- -------
Home.psml               html            en              US              ...
Home.psml               html            en              CA              ...
Shopping.psml   html            en              US              ...
Reference.psml  html            en              null            ...

In the above example if the user with locale en_CA logs in and attempts to
access /page/Shopping they would be served the en_US Shopping psml.  The
reason for this is in the SQL.

 - Returning locator string:
Role:Role100$Page:Shopping.psml$MediaType:html$Country:CA$Language:en
SELECT JETSPEED_ROLE_PROFILE.PSML_ID, JETSPEED_ROLE_PROFILE.ROLE_NAME,
JETSPEED_ROLE_PROFILE.MEDIA_TYPE, JETSPEED_ROLE_PROFILE.LANGUAGE,
JETSPEED_ROLE_PROFILE.COUNTRY, JETSPEED_ROLE_PROFILE.PAGE,
JETSPEED_ROLE_PROFILE.PROFILE 
FROM JETSPEED_ROLE_PROFILE 
WHERE (JETSPEED_ROLE_PROFILE.LANGUAGE='en') AND
(JETSPEED_ROLE_PROFILE.ROLE_NAME='Role100') AND
(JETSPEED_ROLE_PROFILE.PAGE='Shopping.psml') AND
(JETSPEED_ROLE_PROFILE.COUNTRY='CA') AND
(JETSPEED_ROLE_PROFILE.MEDIA_TYPE='html')

**Null returned so it falls back by removing the country from the locator

 - Returning locator string:
Role:Role100$Page:Shopping.psml$MediaType:html$Language:en
SELECT JETSPEED_ROLE_PROFILE.PSML_ID, JETSPEED_ROLE_PROFILE.ROLE_NAME,
JETSPEED_ROLE_PROFILE.MEDIA_TYPE, JETSPEED_ROLE_PROFILE.LANGUAGE,
JETSPEED_ROLE_PROFILE.COUNTRY, JETSPEED_ROLE_PROFILE.PAGE,
JETSPEED_ROLE_PROFILE.PROFILE 
FROM JETSPEED_ROLE_PROFILE 
WHERE (JETSPEED_ROLE_PROFILE.LANGUAGE='en') AND
(JETSPEED_ROLE_PROFILE.ROLE_NAME='Role100') AND
(JETSPEED_ROLE_PROFILE.PAGE='Shopping.psml') AND
(JETSPEED_ROLE_PROFILE.MEDIA_TYPE='html')

**The en_US Shopping.psml row meets the above criteria so it is returned.
The SQL for this should be:

SELECT JETSPEED_ROLE_PROFILE.PSML_ID, JETSPEED_ROLE_PROFILE.ROLE_NAME,
JETSPEED_ROLE_PROFILE.MEDIA_TYPE, JETSPEED_ROLE_PROFILE.LANGUAGE,
JETSPEED_ROLE_PROFILE.COUNTRY, JETSPEED_ROLE_PROFILE.PAGE,
JETSPEED_ROLE_PROFILE.PROFILE 
FROM JETSPEED_ROLE_PROFILE 
WHERE (JETSPEED_ROLE_PROFILE.LANGUAGE='en') AND
(JETSPEED_ROLE_PROFILE.ROLE_NAME='Role100') AND
(JETSPEED_ROLE_PROFILE.PAGE='Shopping.psml') AND
(JETSPEED_ROLE_PROFILE.COUNTRY IS NULL) AND
(JETSPEED_ROLE_PROFILE.MEDIA_TYPE='html')

**Note the selection for country being null.  This causes the en_US
Shopping.psml to not meet the criteria.

I believe the current behavior is incorrect and needs to be fixed.  It
appears the fix requires a change the ProfilePeer classes to add the null
value to the criteria.  

I would appreciate anyone suggesting a better solution or explanation for
the current behavior.  If not then I could post the changed ProfilePeer
classes.

thanks,
marcus


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to