diff options
| author | 2014-10-07 10:16:38 +0200 | |
|---|---|---|
| committer | 2014-10-07 10:16:38 +0200 | |
| commit | 6009990935a2d06c252073f6b51ea5378536ef52 (patch) | |
| tree | f4d9505b63585697599b8d99b03b8d555f638aa7 /app/views | |
| parent | 79aa5beaf44af13a1828bfa5fc824a08c62054dc (diff) | |
Introduce FreshRSS_Auth::hasAccess('admin')
Replace Minz_Configuration::isAdmin($user). FreshRSS_Auth::hasAccess() could
be extended to others scopes later.
See https://github.com/marienfressinaud/FreshRSS/issues/655
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/archiving.phtml | 2 | ||||
| -rw-r--r-- | app/views/users/index.phtml | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/views/configure/archiving.phtml b/app/views/configure/archiving.phtml index a883571aa..adbfdb77e 100644 --- a/app/views/configure/archiving.phtml +++ b/app/views/configure/archiving.phtml @@ -67,7 +67,7 @@ </div> </div> - <?php if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) { ?> + <?php if (FreshRSS_Auth::hasAccess('admin')) { ?> <div class="form-group"> <p class="group-name"><?php echo _t('users'); ?></p> <div class="group-controls"> diff --git a/app/views/users/index.phtml b/app/views/users/index.phtml index 95659f727..f1cdf01a3 100644 --- a/app/views/users/index.phtml +++ b/app/views/users/index.phtml @@ -11,7 +11,7 @@ <div class="group-controls"> <input id="current_user" type="text" disabled="disabled" value="<?php echo Minz_Session::param('currentUser', '_'); ?>" /> <label class="checkbox" for="is_admin"> - <input type="checkbox" id="is_admin" disabled="disabled" <?php echo Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_')) ? 'checked="checked" ' : ''; ?>/> + <input type="checkbox" id="is_admin" disabled="disabled" <?php echo FreshRSS_Auth::hasAccess('admin') ? 'checked="checked" ' : ''; ?>/> <?php echo _t('is_admin'); ?> </label> </div> @@ -44,7 +44,7 @@ <label class="group-name" for="mail_login"><?php echo _t('persona_connection_email'); ?></label> <?php $mail = $this->conf->mail_login; ?> <div class="group-controls"> - <input type="email" id="mail_login" name="mail_login" class="extend" autocomplete="off" value="<?php echo $mail; ?>" <?php echo Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_')) ? '' : 'disabled="disabled"'; ?> placeholder="alice@example.net" /> + <input type="email" id="mail_login" name="mail_login" class="extend" autocomplete="off" value="<?php echo $mail; ?>" <?php echo FreshRSS_Auth::hasAccess('admin') ? '' : 'disabled="disabled"'; ?> placeholder="alice@example.net" /> <noscript><b><?php echo _t('javascript_should_be_activated'); ?></b></noscript> </div> </div> @@ -56,7 +56,7 @@ </div> </div> - <?php if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) { ?> + <?php if (FreshRSS_Auth::hasAccess('admin')) { ?> <legend><?php echo _t('auth_type'); ?></legend> |
