0
0

Fix WebUI notification settings for new user and new report notifications (#19436)

Due to an error in operator priority, those settings would only show up if the
user role included the all-encompassing `administrator` permission and would
display `0` otherwise.
This commit is contained in:
Claire 2022-10-24 17:37:46 +02:00 committed by GitHub
parent 3ad0a2ae3d
commit dd76bbf8b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,7 +170,7 @@ export default class ColumnSettings extends React.PureComponent {
</div>
</div>
{(this.context.identity.permissions & PERMISSION_MANAGE_USERS === PERMISSION_MANAGE_USERS) && (
{((this.context.identity.permissions & PERMISSION_MANAGE_USERS) === PERMISSION_MANAGE_USERS) && (
<div role='group' aria-labelledby='notifications-admin-sign-up'>
<span id='notifications-status' className='column-settings__section'><FormattedMessage id='notifications.column_settings.admin.sign_up' defaultMessage='New sign-ups:' /></span>
@ -183,7 +183,7 @@ export default class ColumnSettings extends React.PureComponent {
</div>
)}
{(this.context.identity.permissions & PERMISSION_MANAGE_REPORTS === PERMISSION_MANAGE_REPORTS) && (
{((this.context.identity.permissions & PERMISSION_MANAGE_REPORTS) === PERMISSION_MANAGE_REPORTS) && (
<div role='group' aria-labelledby='notifications-admin-report'>
<span id='notifications-status' className='column-settings__section'><FormattedMessage id='notifications.column_settings.admin.report' defaultMessage='New reports:' /></span>