#
#  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=cms]

[artifacts startLevel=20]
    org.apache.cocoon/cocoon-serializers-charsets/1.0.0
    org.jsoup/jsoup/1.11.3
    com.vladsch.flexmark/flexmark-osgi/0.34.22
    org.apache.sling/org.apache.sling.fileoptim/0.9.2
    org.apache.sling/org.apache.sling.resourcemerger/1.3.6
    org.apache.sling/org.apache.sling.cms.api/${cms.version}
    org.apache.sling/org.apache.sling.cms.core/${cms.version}
    org.apache.sling/org.apache.sling.cms.ui/${cms.version}
    org.apache.sling/org.apache.sling.cms.reference/${cms.version}
    
[:repoinit]

    # CMS root paths
    create path (sling:OrderedFolder) /etc/i18n
    set ACL for everyone
        allow   jcr:read	on /etc/i18n
    end
    create path (sling:OrderedFolder) /etc/taxonomy
    set ACL for everyone
        allow   jcr:read	on /etc/taxonomy
    end
    create path (sling:OrderedFolder) /static
    set ACL for everyone
        allow   jcr:read	on /static
    end
    create path (sling:OrderedFolder) /conf
    set ACL for everyone
        allow   jcr:read	on /conf
    end
    create path (sling:OrderedFolder) /content

    # Service users
    create service user sling-rewriter
    set ACL for sling-rewriter
        allow   jcr:read    on /
    end
    create service user sling-cms-error
    set ACL for sling-cms-error
    	allow	jcr:read	on /content
    end
    
    # UGC Support
    create path (sling:OrderedFolder) /etc/usergenerated
    set ACL for everyone
        allow   jcr:read	on /etc/usergenerated
    end
    create service user sling-ugc
    set ACL for sling-ugc
        allow   jcr:all    on /etc/usergenerated
    end

