mirror of
https://github.com/flarum/framework.git
synced 2025-02-22 10:42:12 +08:00
Fuzzy-match global forum permissions
This means that the "Start a Discussion" button will still be enabled if the user is not allowed to start globally, but only in certain tags. Also add some other stuff to the changelog. closes #640
This commit is contained in:
parent
d4e52a6ad8
commit
127b4a7607
@ -3,8 +3,22 @@ All notable changes to Flarum and its bundled extensions will be documented in t
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## Unreleased
|
||||
### Added
|
||||
- Allow social auth extensions to upload an avatar via URL for new users
|
||||
- Improve security by using HTTP-only cookie + CSRF token for API authentication
|
||||
- Require user to re-enter password after 30 mins when performing sensitive/destructive actions
|
||||
- Add `onhide` hook to Modal component
|
||||
- i18n: Extract some leftover hardcoded strings
|
||||
|
||||
### Changed
|
||||
- i18n: Rename `core.lib.deleted_user_text` to `core.lib.username.deleted_text`
|
||||
|
||||
### Fixed
|
||||
- Fix error when sorting discussions by "oldest" (#627)
|
||||
- Fix composer preview button on mobile (#196)
|
||||
- Enable "Start a Discussion" button if global permissions are restricted but tag-specific permissions are granted (#640)
|
||||
- Improve composer appearance/usability on mobile
|
||||
- Show "reply" action in discussion menu on mobile
|
||||
- Fix some issues with dropdown positioning
|
||||
- Various user interface tweaks
|
||||
|
||||
|
@ -75,8 +75,8 @@ class ForumSerializer extends AbstractSerializer
|
||||
'themePrimaryColor' => $this->settings->get('theme_primary_color'),
|
||||
'allowSignUp' => (bool) $this->settings->get('allow_sign_up'),
|
||||
'defaultRoute' => $this->settings->get('default_route'),
|
||||
'canViewDiscussions' => $gate->allows('viewDiscussions'),
|
||||
'canStartDiscussion' => $gate->allows('startDiscussion')
|
||||
'canViewDiscussions' => $gate->allows('viewDiscussions') || $this->actor->hasPermissionLike('viewDiscussions'),
|
||||
'canStartDiscussion' => $gate->allows('startDiscussion') || $this->actor->hasPermissionLike('startDiscussion')
|
||||
];
|
||||
|
||||
if ($gate->allows('administrate')) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user