mirror of
https://github.com/flarum/framework.git
synced 2025-01-29 10:34:00 +08:00
Include updating of scoped tag permissions
Addresses https://github.com/flarum/core/issues/2924
The rename `viewDiscussions` migration introduced for Flarum 1.0 does not take tag scoped permissions into account
032db2c146/migrations/2021_05_10_000000_rename_permissions.php (L17)
This adds a new migration to additionally rename `tagX.viewDiscussions` to `tagX.viewForum`
Tested locally on an upgrade from core `beta.16` to `1.0.3`
This commit is contained in:
parent
032db2c146
commit
6e05406f45
|
@ -14,7 +14,7 @@ return [
|
|||
$db = $schema->getConnection();
|
||||
|
||||
$db->table('group_permission')
|
||||
->where('permission', 'LIKE', 'viewDiscussions')
|
||||
->where('permission', 'LIKE', '%viewDiscussions')
|
||||
->update(['permission' => $db->raw("REPLACE(permission, 'viewDiscussions', 'viewForum')")]);
|
||||
|
||||
$db->table('group_permission')
|
||||
|
@ -26,7 +26,7 @@ return [
|
|||
$db = $schema->getConnection();
|
||||
|
||||
$db->table('group_permission')
|
||||
->where('permission', 'LIKE', 'viewForum')
|
||||
->where('permission', 'LIKE', '%viewForum')
|
||||
->update(['permission' => $db->raw("REPLACE(permission, 'viewForum', 'viewDiscussions')")]);
|
||||
|
||||
$db->table('group_permission')
|
||||
|
|
Loading…
Reference in New Issue
Block a user