openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit fc1aa373c9368a604665ef70a47eed6b24b75d60
parent 6eff5d14305310d32f452374a96dd0bccea2b9c5
Author: Jan Dankert <devnull@localhost>
Date:   Tue,  6 Nov 2012 00:12:15 +0100

Neue Guest-Auth.

Diffstat:
auth/GuestAuth.class.php | 33+++++++++++++++++++++++++++++++++
config/config-default.php | 5+++++
2 files changed, 38 insertions(+), 0 deletions(-)

diff --git a/auth/GuestAuth.class.php b/auth/GuestAuth.class.php @@ -0,0 +1,32 @@ +<?php + +/** + * Authentifizierung als Gast-User. + * + * Falls konfiguriert, wird der Gast-Benutzer voreingestellt. + * + * @author dankert + */ +class GuestAuth implements Auth +{ + public function username() + { + $guestConf = $conf['security']['guest']; + + if ( $guestConf['enable'] ) + return $guestConf['user']; + else + return null; + } + + + /** + * Ueberpruefen des Kennwortes ist über Ident nicht möglich. + */ + public function login( $user, $password ) + { + return false; + } +} + +?>+ \ No newline at end of file diff --git a/config/config-default.php b/config/config-default.php @@ -730,6 +730,11 @@ $conf['security']['auth']['userdn']=false; $conf['security']['authorize'] = array(); $conf['security']['authorize']['type']='database'; $conf['security']['authorize']['type']='ldap'; +$conf['security']['modules']['autologin']='ident,guest,SingleSignon'; +$conf['security']['modules']['preselect']='cookie'; +$conf['security']['modules']['select']='SSL'; +$conf['security']['modules']['authenticate']='Internal,'; + $conf['security']['password'] = array(); $conf['security']['password']['random_length']='8'; $conf['security']['password']['min_length']='6';