mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-04 06:02:16 +03:00
Applied latest StyleCI changes
This commit is contained in:
parent
e43f679e62
commit
73a37b3cd9
@ -61,7 +61,7 @@ class SearchApiController extends ApiController
|
||||
$result->setAttribute('type', $result->getType());
|
||||
$result->setAttribute('url', $result->getUrl());
|
||||
$result->setAttribute('preview_html', [
|
||||
'name' => (string) $result->getAttribute('preview_name'),
|
||||
'name' => (string) $result->getAttribute('preview_name'),
|
||||
'content' => (string) $result->getAttribute('preview_content'),
|
||||
]);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@ class UserSearchController extends Controller
|
||||
public function forSelect(Request $request)
|
||||
{
|
||||
$hasPermission = signedInUser() && (
|
||||
userCan('users-manage')
|
||||
userCan('users-manage')
|
||||
|| userCan('restrictions-manage-own')
|
||||
|| userCan('restrictions-manage-all')
|
||||
);
|
||||
|
@ -46,7 +46,7 @@ class SearchApiTest extends TestCase
|
||||
$resp = $this->actingAsApiAdmin()->getJson($this->baseEndpoint . '?query=superuniquevalue');
|
||||
$resp->assertJsonFragment([
|
||||
'type' => 'page',
|
||||
'url' => $page->getUrl(),
|
||||
'url' => $page->getUrl(),
|
||||
]);
|
||||
}
|
||||
|
||||
@ -59,12 +59,12 @@ class SearchApiTest extends TestCase
|
||||
|
||||
$resp = $this->actingAsApiAdmin()->getJson($this->baseEndpoint . '?query=superuniquevalue');
|
||||
$resp->assertJsonFragment([
|
||||
'type' => 'book',
|
||||
'url' => $book->getUrl(),
|
||||
'type' => 'book',
|
||||
'url' => $book->getUrl(),
|
||||
'preview_html' => [
|
||||
'name' => 'name with <strong>superuniquevalue</strong> within',
|
||||
'name' => 'name with <strong>superuniquevalue</strong> within',
|
||||
'content' => 'Description with <strong>superuniquevalue</strong> within',
|
||||
]
|
||||
],
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,6 @@ use Tests\TestCase;
|
||||
|
||||
class UserSearchTest extends TestCase
|
||||
{
|
||||
|
||||
public function test_select_search_matches_by_name()
|
||||
{
|
||||
$viewer = $this->getViewer();
|
||||
@ -64,5 +63,4 @@ class UserSearchTest extends TestCase
|
||||
$resp = $this->get('/search/users/select?search=a');
|
||||
$this->assertPermissionError($resp);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user