[mapserver-dev] Disabled layers are re-enabled by wms_layer_group setting (Bug or feature?)

Tamas Szekeres szekerest at gmail.com
Tue Feb 26 00:31:15 PST 2013


Hi All,

Related to the tests of RFC-90 we found an issue when a layer is disabled
by IP list, but for the GetCapabilities request the layer is re-enabled
when the layer is a part of a wms_layer_group. For example with the
following setting:


LAYER
   NAME Layer1
   METADATA
      "ows_allowed_ip_list" "*"
      "wms_layer_group" "/Layer1"
   END
END

LAYER
   NAME Layer2
   METADATA
      "ows_allowed_ip_list" "!*"
      "wms_layer_group" "/Layer1"
   END
END

Both Layer1 and Layer2 are displayed in GetCapabilities. The same applies
when the layer is completely disabled for GetCapabilities by
enable_request, like:


LAYER
   NAME Layer1
   METADATA
      "wms_enable_request" "GetCapabilities"
       "wms_layer_group" "/Layer1"
   END
END

LAYER
   NAME Layer2
   METADATA
      "wms_enable_request" "!GetCapabilities"
      "wms_layer_group" "/Layer1"
   END
END

Both Layer1 and Layer2 are displayed.

Is this a feature or an issue that should be fixed?


Best regards,

Tamas





2013/2/21 Daniel Morissette <dmorissette at mapgears.com>

> On 13-02-20 10:05 AM, Tamas Szekeres wrote:
>
>> Hi Daniel & All,
>>
>> I've updated RFC-90 to follow the concept mentioned.
>>
>> http://mapserver.org/**development/rfc/ms-rfc-90.html<http://mapserver.org/development/rfc/ms-rfc-90.html>
>>
>> Here is a commit containing the proposed changes according to the recent
>> version:
>> https://github.com/szekerest/**mapserver/commit/**
>> 5d7ec08292e4b790d219082f7ea6ce**d83fc5c336<https://github.com/szekerest/mapserver/commit/5d7ec08292e4b790d219082f7ea6ced83fc5c336>
>>
>>
> Thanks a lot Tamas... the RFC seems to address all my comments now.
>
> BTW, I notice in your commit that you call msOWSLookupMetadata() twice in
> msOWSIpDisabled():
>
>
>   ip_list = msOWSLookupMetadata(metadata, namespaces, "allowed_ip_list");
>
>   if (!ip_list)
>     ip_list = msOWSLookupMetadata(metadata, "O", "allowed_ip_list");
>
> I'm not sure why you do this. FYI the idea behind msOWSLookupMetadata() is
> that all places that pass a "namespaces" arg should include the "O" as the
> last argument in the string... so your second call with the "O" is
> redundant unless I'm mistaken since the namespaces in the previous call
> should contain an "O" already.
>
>
>
> --
> Daniel Morissette
> http://www.mapgears.com/
> Provider of Professional MapServer Support since 2000
>
> ______________________________**_________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/mapserver-dev<http://lists.osgeo.org/mailman/listinfo/mapserver-dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20130226/a799c106/attachment.html>


More information about the mapserver-dev mailing list