mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 14:49:07 +08:00
FIX: Disallow moderators from custom public sidebar sections (#23683)
Currently moderators can see the custom public sidebar section edit button, but they are prevented from making any changes by an error. According to the back-end, moderators can not access these. This PR hides the custom public sidebar section edit button, as well as the "make public" checkbox of the create modal, if the user is not an admin, bringing the UI in line with the back-end. If needed, we can add a site setting to allow moderator access when the need arises.
This commit is contained in:
parent
ca394177cb
commit
7569b64362
|
@ -83,7 +83,7 @@
|
|||
/>
|
||||
{{/if}}
|
||||
|
||||
{{#if (and this.currentUser.staff)}}
|
||||
{{#if (and this.currentUser.admin)}}
|
||||
<div
|
||||
class="row-wrapper mark-public-wrapper
|
||||
{{if this.transformedModel.sectionType '-disabled'}}"
|
||||
|
|
|
@ -37,7 +37,7 @@ export default class Section {
|
|||
}
|
||||
|
||||
get headerActions() {
|
||||
if (!this.section.public || this.currentUser?.staff) {
|
||||
if (!this.section.public || this.currentUser?.admin) {
|
||||
return [
|
||||
{
|
||||
action: () => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user