-
Notifications
You must be signed in to change notification settings - Fork 12
remove allowedRoles from discussions #1311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| Roles.ensureUserIsInRoles(me, discussion.allowedRoles) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come we are not checking for membership here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 42 already has userCanComment(discussion, null, context), which checks that. This is redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good good
| if ( | ||
| (settings.title && settings.title !== discussion.title) || | ||
| (settings.maxLength && settings.maxLength !== discussion.maxLength) || | ||
| (settings.anonymity && settings.anonymity !== discussion.anonymity) || | ||
| (settings.path && settings.path !== discussion.path) || | ||
| (settings.closed !== undefined && | ||
| settings.closed !== null && | ||
| settings.closed !== discussion.closed) || | ||
| (settings.collapsable !== undefined && | ||
| settings.collapsable !== null && | ||
| settings.collapsable !== discussion.collapsable) || | ||
| (settings.tagRequired !== undefined && | ||
| settings.tagRequired !== discussion.tagRequired) || | ||
| (settings.tags && settings.tags !== (discussion.tags || []).join(',')) || | ||
| (settings.allowedRoles && | ||
| settings.allowedRoles !== (discussion.allowedRoles || []).join(',')) || | ||
| (!discussion.repoId && id && !idIsUUID && legacyDiscussionId) // to save repoId to existing discussions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my eyes!! my eyes!! (not your fault, i know, but still, can any human read this?)
annatraussnig
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look reasonable, but we should test the changes before deploy (i haven't).
This is a remnant of klimalabor.