diff options
| author | 2013-12-31 02:59:07 +0100 | |
|---|---|---|
| committer | 2013-12-31 02:59:07 +0100 | |
| commit | 1ac09e7fe4a5408290d06116c6fb8152e018fe26 (patch) | |
| tree | e5f4b3eb7654e0364670a4f180fc5d92f51b0309 /app/Controllers/configureController.php | |
| parent | 84be5ff618a59c510db7627c9b6447835f4364c7 (diff) | |
Multi-utilisateur fonctionnel en HTTP Auth
+ Possibilité d'ajout / suppression d'utilisateur (seulement par
l'administrateur)
+ Divers changements pour le mode multi-utilisateur
https://github.com/marienfressinaud/FreshRSS/issues/126
+ Minz : Renomme "sel_application" en "salt'
Diffstat (limited to 'app/Controllers/configureController.php')
| -rwxr-xr-x | app/Controllers/configureController.php | 41 |
1 files changed, 5 insertions, 36 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index 2260e978b..17abf6b89 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -309,41 +309,6 @@ class FreshRSS_configure_Controller extends Minz_ActionController { } public function usersAction() { - if (Minz_Request::isPost()) { - $ok = true; - $current_token = $this->view->conf->token; - - $mail = Minz_Request::param('mail_login', false); - $token = Minz_Request::param('token', $current_token); - - $this->view->conf->_mail_login($mail); - $this->view->conf->_token($token); - $ok &= $this->view->conf->save(); - - Minz_Session::_param('mail', $this->view->conf->mail_login); - - if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) { - $anon = Minz_Request::param('anon_access', false); - $anon = ((bool)$anon) && ($anon !== 'no'); - $auth_type = Minz_Request::param('auth_type', 'none'); - if ($anon != Minz_Configuration::allowAnonymous() || - $auth_type != Minz_Configuration::authType()) { - Minz_Configuration::_allowAnonymous($anon); - Minz_Configuration::_authType($auth_type); - $ok &= Minz_Configuration::writeFile(); - } - } - - //TODO: use $ok - $notif = array( - 'type' => 'good', - 'content' => Minz_Translate::t('configuration_updated') - ); - Minz_Session::_param('notification', $notif); - - Minz_Request::forward(array('c' => 'configure', 'a' => 'users'), true); - } - Minz_View::prependTitle(Minz_Translate::t ('users') . ' - '); } @@ -369,6 +334,10 @@ class FreshRSS_configure_Controller extends Minz_ActionController { $entryDAO = new FreshRSS_EntryDAO(); $this->view->nb_total = $entryDAO->count(); - $this->view->size_total = $entryDAO->size(); + $this->view->size_user = $entryDAO->size(); + + if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) { + $this->view->size_total = $entryDAO->size(true); + } } } |
