#
#  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]
[variables]
    cms.version=1.0.0

[artifacts startLevel=20]
	org.apache.cocoon/cocoon-serializers-charsets/1.0.0
    org.apache.sling/org.apache.sling.resourcemerger/1.3.6
    org.apache.sling/org.apache.sling.cms.core/1.0.0-SNAPSHOT
    org.apache.sling/org.apache.sling.cms.ui/1.0.0-SNAPSHOT
    org.apache.sling/org.apache.sling.cms.reference/1.0.0-SNAPSHOT
    
[:repoinit]
    create service user sling-rewriter
    
    set ACL for sling-rewriter
        allow   jcr:read    on /
    end
    
    create path (sling:OrderedFolder) /etc/usergenerated
    set ACL for everyone
        allow   jcr:read	on /etc/usergenerated
    end
    
    # sling-ugc
    create service user sling-ugc

    set ACL for sling-ugc
        allow   jcr:all    on /etc/usergenerated
    end

[configurations]
    org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-sling.rewriter
        user.mapping=[
            "org.apache.sling.rewriter\=sling-rewriter"
        ]
    org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended-sling.ugc
        user.mapping=[
            "org.apache.sling.cms.core:sling-ugc\=sling-ugc"
        ]