[opencms-dev] Web Users control accessing pages

Paolo Brunasti - Agora paolo.brunasti at agora.it
Fri Oct 3 11:52:02 CEST 2003


I've created some WebUser with this code :
-----------------------------
 CmsJspActionElement cms = new CmsJspActionElement(pageContext, request, response); 
 CmsObject cmso = cms.getCmsObject(); 
 CmsUser createdUser = cmso.addWebUser(.......
-----------------------------
I associated them with a Group "WebUsers".
Then I create an other web user and associated it with the "WebHidden" group.
I create some pages and directories "pubblic" and others visible only to "WebHidden" group.

When I try to access the "private" pages logged as a user in the "WebUsers" group I got the login popup, and it's OK.
When I try to access the "private" pages logged as a user in the "WebHidden" group I see the pages, and it's OK.
If after that I login as a "WebUsers" user and try to see a "private" page I can see it a first time, then if I try to reload it I got the login popup, and THIS IS THE PROBLEM NUMBER 1 !!!!

Why I can see tha page the first time ?

The browser setting is "Check for newer version of stored pages: Every visit of the page".
The page is almost empty, just a rude html text.



The problem number 2 is : how can I redirect the user to a site specific login page instead of having the login popup ?

The problem number 3 is : how can I show the user to a site specific error page when he/she do not give a correct login instead of the HTTP 401 page ?

Thx all,
          Paolo Brunasti
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20031003/21604792/attachment.htm>


More information about the opencms-dev mailing list