-
-
Notifications
You must be signed in to change notification settings - Fork 5
SF-3619 Allow users who can add/edit questions to see answers before they've answered #3560
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
Conversation
|
I'll update the tests after we get confirmation on the desired behavior |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3560 +/- ##
==========================================
- Coverage 82.80% 82.80% -0.01%
==========================================
Files 608 608
Lines 37187 37201 +14
Branches 6098 6104 +6
==========================================
+ Hits 30794 30803 +9
- Misses 5468 5485 +17
+ Partials 925 913 -12 ☔ View full report in Codecov by Sentry. |
I'm confused about what you are meaning by this :) |
|
tttt |
|
Previously, marksvc wrote…
Ha. Wrong button. |
marksvc
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.
@marksvc reviewed 1 of 1 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @josephmyers)
It's some ambiguity in the description. I'm taking it to mean that this flag should allow them to see all answers, just like Admin's can. However, you could interpret this to mean that they should only be able to see answers from the role Community Checker (the SF user role). We've never done this before, so if this is a bug, then I'd expect there to be remnants of it working like this (and just needing some fixing to restore the behavior). Since there's nothing like that, I think it's unlikely that's the intent. That's all! |
196cc21 to
8004b59
Compare
Nateowami
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.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @marksvc)
src/SIL.XForge.Scripture/ClientApp/src/app/checking/checking/checking-questions/checking-questions.component.ts line 225 at r2 (raw file):
get canManageQuestions(): boolean { return this.isProjectAdmin || this.canAddAndEditQuestions;
This is also wrong.
src/SIL.XForge.Scripture/ClientApp/src/app/checking/checking/checking-answers/checking-answers.component.ts line 295 at r2 (raw file):
} get canAddAndEditQuestions(): boolean {
Given the methods appear to be identical, shouldn't these be service methods, not component getters? I would think the most logical place to put them would be in the SFProjectService.
src/SIL.XForge.Scripture/ClientApp/src/app/checking/checking/checking-answers/checking-answers.component.ts line 316 at r2 (raw file):
get canManageQuestions(): boolean { return this.isProjectAdmin || this.canAddAndEditQuestions;
This is wrong. There should not be a check for the user's role, only a permissions check. In general, any time you see isProjectAdmin, it's not using permissions correctly. You can probably delete isProjectAdmin from this component (and from checking questions).
Nateowami
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.
Reviewable status: 0 of 2 files reviewed, 3 unresolved discussions (waiting on @josephmyers and @marksvc)
src/SIL.XForge.Scripture/ClientApp/src/app/checking/checking/checking-answers/checking-answers.component.ts line 295 at r2 (raw file):
Previously, Nateowami wrote…
Given the methods appear to be identical, shouldn't these be service methods, not component getters? I would think the most logical place to put them would be in the SFProjectService.
permissions.service.ts might be another good option (possibly better)
8004b59 to
4546465
Compare
Note that the task description says "they should also be able to view answers that community checkers submit." This could indicate that we're wanting to only show answers from Community Checker users (and not all answers), but as we've never done that before, and this is labeled a bug, I'm going to opt for not adding that feature until someone tells me I should.
This change is