Add personal API access token
This commit is contained in:
17
app/Template/user_api_access/show.php
Normal file
17
app/Template/user_api_access/show.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class="page-header">
|
||||
<h2><?= t('API User Access') ?></h2>
|
||||
</div>
|
||||
|
||||
<p class="alert">
|
||||
<?php if (empty($user['api_access_token'])): ?>
|
||||
<?= t('No personal API access token registered.') ?>
|
||||
<?php else: ?>
|
||||
<?= t('Your personal API access token is "%s"', $user['api_access_token']) ?>
|
||||
<?php endif ?>
|
||||
</p>
|
||||
|
||||
<?php if (! empty($user['api_access_token'])): ?>
|
||||
<?= $this->url->link(t('Remove your token'), 'UserApiAccessController', 'remove', array('user_id' => $user['id']), true, 'btn btn-red') ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->url->link(t('Generate a new token'), 'UserApiAccessController', 'generate', array('user_id' => $user['id']), true, 'btn btn-blue') ?>
|
||||
@@ -90,6 +90,11 @@
|
||||
<?= $this->url->link(t('Integrations'), 'UserViewController', 'integrations', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php if ($this->user->hasAccess('UserApiAccessController', 'show')): ?>
|
||||
<li <?= $this->app->checkMenuSelection('UserApiAccessController', 'show') ?>>
|
||||
<?= $this->url->link(t('API'), 'UserApiAccessController', 'show', array('user_id' => $user['id'])) ?>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($this->user->hasAccess('UserCredentialController', 'changeAuthentication')): ?>
|
||||
|
||||
Reference in New Issue
Block a user