enonic/xp

Limit mount to site, webapp, admin, api

Closed this issue · 1 comments

<?xml version="1.0" encoding="UTF-8"?>
<api xmlns="urn:enonic:xp:model:1.0">
<mounts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="example.xsd">
    <mount>api</mount>
    <mount>all_sites</mount>
    <mount>site</mount>
</mounts>
</api>
<xs:simpleType name="mountType">
        <xs:restriction base="xs:string">
            <xs:enumeration value="api"/>
            <xs:enumeration value="all_sites"/>
            <xs:enumeration value="site"/>
            <xs:enumeration value="all_webapps"/>
            <xs:enumeration value="webapp"/>
            <xs:enumeration value="admin"/>
        </xs:restriction>
    </xs:simpleType>

api - available on /api/
all_sites - available on any site /[admin/]site/<project>/<branch>/.../some-site/.../_/... even if application is not set on a site.
site - available on sites (and projects) where application is set. It does not include project root. Ignored if all_sites is also listed.
all_webapps - available on all webapps /webapp/<app-name>/.../_/...
webapp - available on application's webapp. Ignored if all_webapps is also listed
admin - available on /admin/tool/.../_/... NOTE: Does not enable it on /admin/site, /admin, /admin/rest`, etc

Can we add the XML descriptor spec to this task?