Skip to content

Commit 7e36648

Browse files
committed
Issue with adding / managing keys when logged in as admin
18:10] Curtis Stewart: @jaap Marcus Figured it out. If you create a key for a user without logging into the user, it gets added to the admin authorized_keys file. Just hide the option to manage the key
1 parent 0e40dcb commit 7e36648

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

web/templates/admin/edit_user.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
<div class="l-sort clearfix">
33
<div class="l-unit-toolbar__buttonstrip">
44
<a class="ui-button cancel" id="btn-back" href="/list/user/"><i class="fas fa-arrow-left status-icon blue"></i> <?=_('Back')?></a>
5-
<a href="/list/key/" id="btn-create" class="ui-button cancel" title="<?=_('Manage SSH keys');?>"><i class="fas fa-key status-icon orange"></i><?=_('Manage SSH keys')?></a>
5+
<?php if( $_SESSION['user'] == $_GET['user'] || isset($_SESSION['look'])){?>
6+
<a href="/list/key/" id="btn-create" class="ui-button cancel" title="<?=_('Manage SSH keys');?>"><i class="fas fa-key status-icon orange"></i><?=_('Manage SSH keys')?></a>
7+
<?php } ?>
68
</div>
79
<div class="l-unit-toolbar__buttonstrip float-right">
810
<a href="#" class="ui-button" title="<?=_('Save')?>" data-action="submit" data-id="vstobjects"><i class="fas fa-save status-icon purple"></i> <?=_('Save')?></a>

0 commit comments

Comments
 (0)