<!-- 
    ========================================================================
    * Copyright (c) 2009 Civic Computing Ltd.
    * All rights reserved.
    *
    * This file is part of Content Control.
    *
    * Content Control is free software: you can redistribute it and/or modify
    * it under the terms of the GNU General Public License as published by
    * the Free Software Foundation, either version 3 of the License, or
    * (at your option) any later version.
    *
    * Content Control is distributed in the hope that it will be useful,
    * but WITHOUT ANY WARRANTY; without even the implied warranty of
    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    * GNU General Public License for more details.
    *
    * You should have received a copy of the GNU General Public License
    * along with Content Control.  If not, see http://www.gnu.org/licenses/.
    *
    * Revision      $Rev: 2914 $
    * Modified by   $Author: keith $
    * Modified on   $Date: 2010-06-15 14:16:47 +0100 (Tue, 15 Jun 2010) $
    *
    * Changes: See Subversion log.
    ========================================================================
-->

<policy>
    <application-policy name="smc">
        <authentication>
            <login-module code="ccc.security.CCCLoginModule" flag="required">
                <module-option name="dsJndiName">java:/smc</module-option>
                <module-option name="principalsQuery">SELECT users.id, users.hash, users.id  FROM users WHERE users.username=?</module-option>
                <module-option name="rolesQuery">
                    SELECT p.permission 
                    FROM user_roles u, groups g, group_permissions p 
                    WHERE u.group_id = g.id 
                    AND g.id  = p.group_id  
                    AND u.user_id=?
                </module-option>
                <module-option name="ldapProviderUrl"></module-option>
                <module-option name="baseDn"></module-option>
            </login-module>
        </authentication>
    </application-policy>
</policy>

