mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Added hidden public role to fit with new permissions system
This commit is contained in:
@ -49,9 +49,15 @@
|
||||
<hr>
|
||||
<p class="text-muted">No pages are currently in this chapter.</p>
|
||||
<p>
|
||||
<a href="{{$chapter->getUrl() . '/create-page'}}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
|
||||
<em class="text-muted">-or-</em>
|
||||
<a href="{{$book->getUrl() . '/sort'}}" class="text-book"><i class="zmdi zmdi-book"></i>Sort the current book</a>
|
||||
@if(userCan('page-create', $chapter))
|
||||
<a href="{{$chapter->getUrl() . '/create-page'}}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a>
|
||||
@endif
|
||||
@if(userCan('page-create', $chapter) && userCan('book-update', $book))
|
||||
<em class="text-muted">-or-</em>
|
||||
@endif
|
||||
@if(userCan('book-update', $book))
|
||||
<a href="{{$book->getUrl() . '/sort'}}" class="text-book"><i class="zmdi zmdi-book"></i>Sort the current book</a>
|
||||
@endif
|
||||
</p>
|
||||
<hr>
|
||||
@endif
|
||||
|
@ -66,8 +66,8 @@
|
||||
<div class="form-group">
|
||||
<label for="setting-registration-role">Default user role after registration</label>
|
||||
<select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
|
||||
@foreach(\BookStack\Role::all() as $role)
|
||||
<option value="{{$role->id}}"
|
||||
@foreach(\BookStack\Role::visible() as $role)
|
||||
<option value="{{$role->id}}" data-role-name="{{ $role->name }}"
|
||||
@if(setting('registration-role', \BookStack\Role::first()->id) == $role->id) selected @endif
|
||||
>
|
||||
{{ $role->display_name }}
|
||||
|
@ -31,11 +31,11 @@
|
||||
</p>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Create</th>
|
||||
<th>View</th>
|
||||
<th>Edit</th>
|
||||
<th>Delete</th>
|
||||
<th width="20%"></th>
|
||||
<th width="20%">Create</th>
|
||||
<th width="20%">View</th>
|
||||
<th width="20%">Edit</th>
|
||||
<th width="20%">Delete</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Books</td>
|
||||
@ -96,6 +96,7 @@
|
||||
<tr>
|
||||
<td>Images</td>
|
||||
<td>@include('settings/roles/checkbox', ['permission' => 'image-create-all'])</td>
|
||||
<td style="line-height:1.2;"><small class="faded">Controlled by the asset they are uploaded to</small></td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'image-update-own']) Own</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'image-update-all']) All</label>
|
||||
|
@ -13,7 +13,7 @@
|
||||
@if(userCan('users-manage'))
|
||||
<div class="form-group">
|
||||
<label for="role">User Role</label>
|
||||
@include('form/role-checkboxes', ['name' => 'roles', 'roles' => \BookStack\Role::all()])
|
||||
@include('form/role-checkboxes', ['name' => 'roles', 'roles' => $roles])
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
@if(userCan('users-manage'))
|
||||
<div class="form-group">
|
||||
<label for="role">User Role</label>
|
||||
@include('form/role-checkboxes', ['name' => 'roles', 'roles' => \BookStack\Role::all()])
|
||||
@include('form/role-checkboxes', ['name' => 'roles', 'roles' => $roles])
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
Reference in New Issue
Block a user