-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add conversation part for open/closed status changed #1636
Comments
Proposed solutionrename
|
On the topic of authorization filtering on the clientIf it were a simple, quick check, I'd be fine with this. However, we are scoping our API. The API should not return information the client should not see, no exceptions. Checking for the ability from the client means, (remember, we are in
That's a lot of requests before the UI can be rendered safely, for something our API should be doing and we're just double-checking, just in case. If we did some sideloading here, I'd be fine. For a moment, I thought there may be value in this check allowing the admin to see all parts regardless of which route they are on, but really, that should work with just scoping. It's possible I'm missing some key aspect here, would not be the first time 😬 , but outside of that, I don't think the benefits outweigh the cost. |
You will also need to modify the |
This goes in conversation part and would if else on the part_type.A cleaner solution would be to have the thread decide which component to render based on part type, then |
If you think there's no risk of the user seeing a part that's not intended for them, then fine. The other approach that I could suggest is that we have the conversation threads have type switching on them. So a conversation thread that we render in the project/conversations would show all conversation parts, whereas a thread we render in the /conversations would show only comment parts. This avoids the issue of the request and still scopes the parts, plus allows us to be more explicit in the client. |
I think I actually prefer my last comment now. |
My last comment would involve taking the |
As I said in chat, I like the idea of specifying thread type. It could even be used for other potential features. There is an argument to be made, however, that if we're rendering a conversation thread of type "project" and another one of type "user", why not just call them No
In my view, If a user is able to, in any way, ever, receive data from the API which they should not be able to see, then our API is unsafe and we need to deal with it immediately. The ember app rendering or not rendering that data, while adding a minor failsafe, is in no way a fix. So what I'm saying is, if there is a risk, that means we have an API problem. |
I agree with this.
We could maybe refactor some things like:
What do you think of these proposed changes? That would also make things like:
...seem even clearer, since each |
Problem
We need to add a conversation part that includes a simple border and some small text saying either:
These parts should not be shown in the user's view of a conversation. Only the
comment
part_type
should be shown. We'll have to add a check for whether the user has admin privileges to see that information.This is blocked by the API adding a
part_type
for us to determine the type of conversation part to display.Also needs code-corps/code-corps-api#1322 to be done to be mergeable.
The text was updated successfully, but these errors were encountered: