mirror of
https://github.com/flarum/framework.git
synced 2025-02-18 10:22:47 +08:00
![]() Get rid of Permissible - too complex and inefficient. Replace with: - a “Locked” trait which works similarly but only evaluates logic on hydrated models. - a “VisibleScope” trait which also works similarly but only scopes queries This is all we need, Permissible is overkill. There is only one instance where we have to duplicate some logic (Discussion::scopeVisiblePosts and Post::allow(‘view’, …)) but it’s barely anything. Haven’t decoupled for now, we can definitely look at doing that later. Permissions table seeder slightly updated. Also did a bit of a query audit, there’s still a lot to be done but it’s much better than it was. Some relatively low-hanging fruit detailed in EloquentPostRepository. |
||
---|---|---|
.. | ||
2015_02_24_000000_create_access_tokens_table.php | ||
2015_02_24_000000_create_activity_table.php | ||
2015_02_24_000000_create_config_table.php | ||
2015_02_24_000000_create_discussions_table.php | ||
2015_02_24_000000_create_email_tokens_table.php | ||
2015_02_24_000000_create_groups_table.php | ||
2015_02_24_000000_create_notifications_table.php | ||
2015_02_24_000000_create_password_tokens_table.php | ||
2015_02_24_000000_create_permissions_table.php | ||
2015_02_24_000000_create_posts_table.php | ||
2015_02_24_000000_create_users_discussions_table.php | ||
2015_02_24_000000_create_users_groups_table.php | ||
2015_02_24_000000_create_users_table.php |