mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-20 02:11:52 -04:00
Un peu de configuration utilisateur
Continue https://github.com/marienfressinaud/FreshRSS/issues/126
This commit is contained in:
1 parent
48a1a36222
commit
3273fee15e
4 files changed
+20
-9
No files matched your search
@@ -163,6 +163,8 @@ return array (
|
||||
'auth_token' => 'Authentication token',
|
||||
'explain_token' => 'Allows to access RSS output without authentication.<br />%s?token=%s',
|
||||
'login_configuration' => 'Login',
|
||||
'is_admin' => 'is administrator',
|
||||
'auth_type' => 'Authentication method',
|
||||
|
||||
'language' => 'Language',
|
||||
'month' => 'months',
|
||||
|
||||
@@ -163,6 +163,8 @@ return array (
|
||||
'auth_token' => 'Jeton d’identification',
|
||||
'explain_token' => 'Permet d’accéder à la sortie RSS sans besoin de s’authentifier.<br />%s?output=rss&token=%s',
|
||||
'login_configuration' => 'Identification',
|
||||
'is_admin' => 'est administrateur',
|
||||
'auth_type' => 'Méthode d’authentification',
|
||||
|
||||
'language' => 'Langue',
|
||||
'month' => 'mois',
|
||||
|
||||
@@ -6,14 +6,6 @@
|
||||
<form method="post" action="<?php echo _url('configure', 'users'); ?>">
|
||||
<legend><?php echo Minz_Translate::t('users'); ?></legend>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="current_user">Current user</label>
|
||||
<div class="group-controls">
|
||||
<input id="current_user" type="text" readonly="readonly" value="<?php echo Minz_Configuration::currentUser(); ?>" />
|
||||
<code>$_SERVER['REMOTE_USER'] = <?php echo isset($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'] : ''; ?></code>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="group-controls">
|
||||
<label class="checkbox" for="anon_access">
|
||||
@@ -24,7 +16,7 @@
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="auth_type">Authentification method</label>
|
||||
<label class="group-name" for="auth_type"><?php echo Minz_Translate::t('auth_type'); ?></label>
|
||||
<div class="group-controls">
|
||||
<select id="auth_type" name="auth_type">
|
||||
<option value="none">None (dangerous)</option>
|
||||
@@ -35,6 +27,18 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="group-name" for="current_user"><?php echo Minz_Translate::t('current_user'); ?></label>
|
||||
<div class="group-controls">
|
||||
<input id="current_user" type="text" disabled="disabled" value="<?php echo Minz_Configuration::currentUser(); ?>" />
|
||||
<code>$_SERVER['REMOTE_USER'] = <?php echo isset($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'] : ''; ?></code>
|
||||
<label class="checkbox" for="is_admin">
|
||||
<input type="checkbox" id="is_admin" disabled="disabled"<?php echo Minz_Configuration::isAdmin() ? ' checked="checked"' : ''; ?> />
|
||||
<?php echo Minz_Translate::t('is_admin'); ?>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-actions">
|
||||
<div class="group-controls">
|
||||
<button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
|
||||
|
||||
@@ -96,6 +96,9 @@ class Minz_Configuration {
|
||||
public static function currentUser () {
|
||||
return self::$current_user;
|
||||
}
|
||||
public static function isAdmin () {
|
||||
return self::$current_user === self::$default_user;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialise les variables de configuration
|
||||
|
||||
Reference in new issue
Block a user