#
#  Licensed to the Apache Software Foundation (ASF) under one
#  or more contributor license agreements.  See the NOTICE file
#  distributed with this work for additional information
#  regarding copyright ownership.  The ASF licenses this file
#  to you under the Apache License, Version 2.0 (the
#  "License"); you may not use this file except in compliance
#  with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing,
#  software distributed under the License is distributed on an
#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#  KIND, either express or implied.  See the License for the
#  specific language governing permissions and limitations
#  under the License.
#
[feature name=repoinit]

[artifacts]
  org.apache.sling/org.apache.sling.repoinit.parser/1.6.2
  org.apache.sling/org.apache.sling.jcr.repoinit/1.1.24
  org.apache.sling/org.apache.sling.provisioning.model/1.8.6

[:repoinit]
    # general
    create path (sling:OrderedFolder) /content
    set ACL for everyone
        allow   jcr:read	on /content
    end

    # sling-mapping
    create service user sling-mapping

    set ACL for sling-mapping
        allow   jcr:read    on /
    end

    # sling-readall
    create service user sling-readall

    set ACL for sling-readall
        allow   jcr:read    on /
    end

    # sling-xss
    create service user sling-xss

    create path (sling:Folder) /apps/sling/xss

    set ACL for sling-xss
        allow   jcr:read    on /apps/sling/xss
    end

    # sling-i18n
    create service user sling-i18n

    set ACL for sling-i18n
        allow   jcr:read    on /
    end

    # sling-jcr-install
    create service user sling-jcr-install

    # used for config OSGi writeback
    create path (sling:Folder) /apps/sling/install

    set ACL for sling-jcr-install
        allow	jcr:read	on	/
        allow	rep:write	on /apps/sling/install
    end

[configurations]
  org.apache.sling.jcr.repoinit.impl.RepositoryInitializer
    references="model@repoinit:context:/resources/provisioning/model.txt"
