mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-30 04:23:11 +03:00
Started work on API token controls
- Added access-api permission. - Started user profile UI work. - Created database table and model for tokens. - Fixed incorrect templates down migration :(
This commit is contained in:
@ -87,6 +87,25 @@
|
||||
</div>
|
||||
</section>
|
||||
@endif
|
||||
|
||||
{{-- TODO - Review Control--}}
|
||||
@if(($currentUser->id === $user->id && userCan('access-api')) || userCan('manage-users'))
|
||||
<section class="card content-wrap auto-height">
|
||||
<div class="grid half">
|
||||
<div><h2 class="list-heading">{{ trans('settings.users_api_tokens') }}</h2></div>
|
||||
<div class="text-right pt-xs">
|
||||
@if(userCan('access-api'))
|
||||
<a href="{{ $user->getEditUrl('/create-api-token') }}" class="button outline">{{ trans('settings.users_api_tokens_create') }}</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@if (count($user->apiTokens) > 0)
|
||||
|
||||
@else
|
||||
<p class="text-muted italic py-m">{{ trans('settings.users_api_tokens_none') }}</p>
|
||||
@endif
|
||||
</section>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
Reference in New Issue
Block a user