[mapguide-users] Permissions problem...
Andrew DeMerchant
andrew.demerchant at gemtec.ca
Wed Nov 8 10:35:06 EST 2006
The first suggestion didn't work for me anyway. Your 2nd suggestion did
the trick. Thanks! Now we just need to get that fix added into the next
build...
Andrew
Dave Wilson wrote:
> Actually a better solution might be to do the following:
>
> rather than modify the if (forDWF !=)
>
> The code branches depending on the viewer. The code after the section
> I initially showed is this:
>
> else
> {
> //AJAX viewer enforce login here. DWF viewer enforces
> loggin during the inital GETMAP request
> RequestAuthentication(response);
> return;
> }
>
> Maybe this code should fire regardless of the viewer type and we just
> revove the check for DWF.
>
> Dave
>
> ------------------------------------------------------------------------
> *From:* Walt Welton-Lair
> *Sent:* Wednesday, November 08, 2006 8:16 AM
> *To:* users at mapguide.osgeo.org
> *Subject:* RE: [mapguide-users] Permissions problem...
>
> Nice. Maybe this "fix" should be submitted...
>
> ------------------------------------------------------------------------
> *From:* Dave Wilson
> *Sent:* Wednesday, November 08, 2006 4:12 PM
> *To:* users at mapguide.osgeo.org
> *Subject:* RE: [mapguide-users] Permissions problem...
>
> Andrew,
>
> it is possible to get the authentication to behave the same way for
> the DWF viewer I believe.
>
> In your WebServerExtensions directory under mapviewerxxx edit
> mainframe.php (jsp or aspx - whichever flavour you chose) and modify a
> couple of lines of code:
>
> else
> {
> if (forDwf != 0)
> {
> anonymousLogin = true;
> cred.SetMgUsernamePassword("Anonymous", "");
> }
>
> One option is to do the following:
>
> else
> {
> if (forDwf != 0)
> {
> anonymousLogin = false;
> cred.SetMgUsernamePassword("", "");
> }
>
> You shouldthen be prompted for a login prior to loading the WebLayout and you should get the expected results you are looking for I think.
>
> Just search on anonymous and you will find the code immediately.
>
> Dave
>
> ------------------------------------------------------------------------
> *From:* Andrew DeMerchant [mailto:andrew.demerchant at gemtec.ca]
> *Sent:* Wednesday, November 08, 2006 6:44 AM
> *To:* users at mapguide.osgeo.org
> *Subject:* Re: [mapguide-users] Permissions problem...
>
> Thanks
>
>
> Walt Welton-Lair wrote:
>> No problem, I updated it.
>>
>> ------------------------------------------------------------------------
>> *From:* Andrew DeMerchant [mailto:andrew.demerchant at gemtec.ca]
>> *Sent:* Wednesday, November 08, 2006 2:15 PM
>> *To:* users at mapguide.osgeo.org
>> *Subject:* Re: [mapguide-users] Permissions problem...
>>
>> Too late...I submitted it last night, and don't see a way to edit it.
>> It's MG446 if you (or anyone else watching this thread) has the means
>> to edit it....
>>
>> Andrew
>>
>>
>> Walt Welton-Lair wrote:
>>> Thanks. In the artifact please include the final diagnosis below.
>>>
>>> -----Original Message-----
>>> From: Andrew DeMerchant [mailto:andrew.demerchant at gemtec.ca]
>>> Sent: Wednesday, November 08, 2006 4:37 AM
>>> To: users at mapguide.osgeo.org
>>> Subject: Re: [mapguide-users] Permissions problem...
>>>
>>> Sounds about right......at least I know I'm not missing something
>>> obvious. I'll submit an artifact...
>>>
>>> Andrew
>>>
>>>
>>> Walt Welton-Lair wrote:
>>>
>>>> I tested this a little more, and here's what I found.
>>>>
>>>> When opening a web layout using AJAX viewer, the login prompt appears
>>>> immediately, before *any* server request is even made. The first
>>>> server operation then ends up being an authentication request
>>>> (OpAuthenticate). After this come the requests for resources - the
>>>> web layout, etc. These succeed because we have provided credentials.
>>>>
>>>> When opening a web layout using DWF viewer, the behavior is
>>>> different. There's a couple of authentication requests that get made
>>>> using "anonymous" user, but no login prompt has yet been displayed.
>>>> Then comes a request to get the web layout resource, again using
>>>> "anonymous". This fails because user "anonymous" does not have access
>>>>
>>>
>>>
>>>> to the library. The browser then displays the exception message.
>>>>
>>>> At this point the web layout hasn't been loaded and DWF Viewer hasn't
>>>> even entered into the picture. So this is a MapGuide web tier
>>>>
>>> issue...
>>>
>>>>
>>>> Walt
>>>>
>>>>
>>> ------------------------------------------------------------------------
>>>
>>>> *From:* Andrew DeMerchant [mailto:andrew.demerchant at gemtec.ca]
>>>> *Sent:* Tuesday, November 07, 2006 6:29 PM
>>>> *To:* users at mapguide.osgeo.org
>>>> *Subject:* Re: [mapguide-users] Permissions problem...
>>>>
>>>> Ya, that's sort of what I figured was happening....that it's not
>>>> asking me to log in, because it doesn't have permission to ask...which
>>>>
>>>
>>>
>>>> is a bit silly. If that's the case, then it's a fairly annoying
>>>>
>>> bug....
>>>
>>>> Andrew
>>>>
>>>> Walt Welton-Lair wrote:
>>>>
>>>>> So it's a question of order. Should MapGuide first authenticate
>>>>> before it tries to access the resource (and find out that you don't
>>>>> have permission)? It looks like it does it the other way - it checks
>>>>>
>>>
>>>
>>>>> whether you have permission before authenticating. I don't know the
>>>>> right answer.
>>>>>
>>>>> I do know that the DWF Viewer code which handles the HTTP request
>>>>> knows nothing about MapGuide and doesn't know what to do with the
>>>>> permission denied response.
>>>>>
>>>>> Walt
>>>>>
>>>>>
>>>>>
>>> ------------------------------------------------------------------------
>>>
>>>>> *From:* Andrew DeMerchant [mailto:andrew.demerchant at gemtec.ca]
>>>>> *Sent:* Tuesday, November 07, 2006 6:15 PM
>>>>> *To:* users at mapguide.osgeo.org
>>>>> *Subject:* Re: [mapguide-users] Permissions problem...
>>>>>
>>>>> Ah...sorry. I should have posted the error that it gives me.....When
>>>>> I try to use the DWF Viewer, this is what I get:
>>>>>
>>>>> Permission denied to resource: Library://test/
>>>>>
>>>>> Permission denied to resource: Library://test/ Exception occurred in
>>>>> method MgResourceHeaderManager.CheckPermission at line 2495 in file
>>>>>
>>>>>
>>> c:\build_tux_area\mgdev_opensource\server\src\services\resource\Resource
>>> HeaderManager.cpp
>>>
>>>>> Andrew
>>>>>
>>>>>
>>>>> Walt Welton-Lair wrote:
>>>>>
>>>>>> So DWF Viewer doesn't prompt for credentials. Do you get back any
>>>>>> data or does it just sit there?
>>>>>>
>>>>>> Ultimately DWF Viewer simply makes a Mapping Service GetMap HTTP
>>>>>> request via WinINet. It prompts for credentials when it gets a 401
>>>>>> response to that initial request, and then resubmits the GetMap
>>>>>> request. If it just sits there that means it didn't get a 401
>>>>>> response and it thinks it's done.
>>>>>>
>>>>>> Walt
>>>>>>
>>>>>>
>>>>>>
>>> ------------------------------------------------------------------------
>>>
>>>>>> *From:* Andrew DeMerchant [mailto:andrew.demerchant at gemtec.ca]
>>>>>> *Sent:* Tuesday, November 07, 2006 4:53 PM
>>>>>> *To:* users at mapguide.osgeo.org
>>>>>> *Subject:* [mapguide-users] Permissions problem...
>>>>>>
>>>>>> I've got a project that I want to password protect....I've given a
>>>>>> specific MapGuide User read permissions to my library (removed
>>>>>> 'Everyone', and added 'Administrator' as read/write as well). What's
>>>>>>
>>>
>>>
>>>>>> happening now is that the DWF viewer isn't asking me to log in. If I
>>>>>>
>>>
>>>
>>>>>> change my URL to use the AJAX viewer, it works fine (asks me to log
>>>>>> in, and then works as it should). So, for example:
>>>>>>
>>>>>> http://host/mapguide/mapviewerdwf/?WEBLAYOUT=..... ----This does
>>>>>> NOT work
>>>>>>
>>>>>> http://host/mapguide/mapviewerajax/?WEBLAYOUT=..... ----This DOES
>>>>>>
>>> work
>>>
>>>>>> This happens on any PC that I've tested it on. Am I missing
>>>>>> something here, or is this a bug? I'm using v1.0.2.17861 (the latest
>>>>>>
>>>
>>>
>>>>>> release).
>>>>>>
>>>>>> Andrew
>>>>>> --
>>>>>> *Andrew DeMerchant*
>>>>>> *Computer Technologist*
>>>>>> ph.1-877-2GEMTEC x.163
>>>>>> fax 506-453-9470
>>>>>>
>>>>>> /GEMTEC Limited <http://www.gemtec.ca>
>>>>>> /191 Doak Road
>>>>>> Fredericton, NB, Canada
>>>>>> E3C 2E6
>>>>>>
>>>>>>
>>>>> --
>>>>> *Andrew DeMerchant*
>>>>> *Computer Technologist*
>>>>> ph.1-877-2GEMTEC x.163
>>>>> fax 506-453-9470
>>>>>
>>>>> /GEMTEC Limited <http://www.gemtec.ca>
>>>>> /191 Doak Road
>>>>> Fredericton, NB, Canada
>>>>> E3C 2E6
>>>>>
>>>>>
>>>> --
>>>> *Andrew DeMerchant*
>>>> *Computer Technologist*
>>>> ph.1-877-2GEMTEC x.163
>>>> fax 506-453-9470
>>>>
>>>> /GEMTEC Limited <http://www.gemtec.ca>
>>>> /191 Doak Road
>>>> Fredericton, NB, Canada
>>>> E3C 2E6
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
>>> For additional commands, e-mail: users-help at mapguide.osgeo.org
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
>>> For additional commands, e-mail: users-help at mapguide.osgeo.org
>>>
>>>
>>>
>>>
>>
>> --
>> *Andrew DeMerchant*
>> *Computer Technologist*
>> ph.1-877-2GEMTEC x.163
>> fax 506-453-9470
>>
>> /GEMTEC Limited <http://www.gemtec.ca>
>> /191 Doak Road
>> Fredericton, NB, Canada
>> E3C 2E6
>>
>
> --
> *Andrew DeMerchant*
> *Computer Technologist*
> ph.1-877-2GEMTEC x.163
> fax 506-453-9470
>
> /GEMTEC Limited <http://www.gemtec.ca>
> /191 Doak Road
> Fredericton, NB, Canada
> E3C 2E6
>
--
*Andrew DeMerchant*
*Computer Technologist*
ph.1-877-2GEMTEC x.163
fax 506-453-9470
/GEMTEC Limited <http://www.gemtec.ca>
/191 Doak Road
Fredericton, NB, Canada
E3C 2E6
-------------- next part --------------
Skipped content of type multipart/related
More information about the Mapguide_users
mailing list