mirror of
https://github.com/flarum/core.git
synced 2025-07-23 01:31:40 +02:00
Rename viewDiscussions => viewForum, viewUserList => searchUsers (#2854)
This naming is clearer as to the intended effect. Changes include: - A migration to rename all permissions - Updating the seed migration to use the original naming from the start - Replacing usage of the old names with new names in code - Throwing warnings when the old names are used.
This commit is contained in:
committed by
GitHub
parent
06f63a2087
commit
d64750b3eb
@@ -46,7 +46,7 @@ class WithApiKeyTest extends TestCase
|
||||
);
|
||||
|
||||
$data = json_decode($response->getBody()->getContents(), true);
|
||||
$this->assertFalse($data['data']['attributes']['canViewUserList']);
|
||||
$this->assertFalse($data['data']['attributes']['canSearchUsers']);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -60,7 +60,7 @@ class WithApiKeyTest extends TestCase
|
||||
);
|
||||
|
||||
$data = json_decode($response->getBody()->getContents(), true);
|
||||
$this->assertTrue($data['data']['attributes']['canViewUserList']);
|
||||
$this->assertTrue($data['data']['attributes']['canSearchUsers']);
|
||||
$this->assertArrayHasKey('adminUrl', $data['data']['attributes']);
|
||||
|
||||
$key = ApiKey::where('key', 'mastertoken')->first();
|
||||
@@ -79,7 +79,7 @@ class WithApiKeyTest extends TestCase
|
||||
);
|
||||
|
||||
$data = json_decode($response->getBody()->getContents(), true);
|
||||
$this->assertTrue($data['data']['attributes']['canViewUserList']);
|
||||
$this->assertTrue($data['data']['attributes']['canSearchUsers']);
|
||||
$this->assertArrayNotHasKey('adminUrl', $data['data']['attributes']);
|
||||
|
||||
$key = ApiKey::where('key', 'personaltoken')->first();
|
||||
@@ -98,7 +98,7 @@ class WithApiKeyTest extends TestCase
|
||||
);
|
||||
|
||||
$data = json_decode($response->getBody()->getContents(), true);
|
||||
$this->assertTrue($data['data']['attributes']['canViewUserList']);
|
||||
$this->assertTrue($data['data']['attributes']['canSearchUsers']);
|
||||
$this->assertArrayNotHasKey('adminUrl', $data['data']['attributes']);
|
||||
|
||||
$key = ApiKey::where('key', 'personaltoken')->first();
|
||||
|
Reference in New Issue
Block a user