diff options
| author | 2019-09-18 17:26:10 +0200 | |
|---|---|---|
| committer | 2019-09-18 17:26:10 +0200 | |
| commit | 1402db4cbc0fa4ff161fcbc3acb61d1894d603b2 (patch) | |
| tree | 659e62987b68d9a240d19f017b420a9861005f11 /app | |
| parent | 410c4af6bb92ebd5d4754017a46b7420941345f2 (diff) | |
Hide the admin checkbox if user is not admin (#2531)
Diffstat (limited to 'app')
| -rw-r--r-- | app/views/user/profile.phtml | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/app/views/user/profile.phtml b/app/views/user/profile.phtml index 87aa25b11..df43642dd 100644 --- a/app/views/user/profile.phtml +++ b/app/views/user/profile.phtml @@ -15,13 +15,20 @@ <label class="group-name" for="current_user"><?php echo _t('conf.user.current'); ?></label> <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 FreshRSS_Auth::hasAccess('admin') ? 'checked="checked" ' : ''; ?>/> - <?php echo _t('conf.user.is_admin'); ?> - </label> </div> </div> + <?php if (FreshRSS_Auth::hasAccess('admin')) { ?> + <div class="form-group"> + <div class="group-controls"> + <label class="checkbox" for="is_admin"> + <input type="checkbox" id="is_admin" disabled checked /> + <?php echo _t('conf.user.is_admin'); ?> + </label> + </div> + </div> + <?php } ?> + <div class="form-group"> <label class="group-name" for="email"><?php echo _t('conf.profile.email'); ?></label> <div class="group-controls"> |
