In cases where a member isn’t allowed to post, the composer should not open under any circumstances.
Currently if TL settings are set so that TL0 isn’t allowed to post, hitting C opens the composer window.
The discussion addresses a bug where the composer shortcut opens even when a user is not allowed to post. HAWK reports that the composer should not open in such cases. jomaxro references a prior report about closed topics and clarifies that this issue is broader. codinghorror highlights the need for a fix, and sam explains the technical challenge: permission checks are tied to category context, not the user’s general ability to create topics. A fix was implemented in commit e756d02 for topic creation. SidV notes that the issue also affects closed topics when using SHIFT + R, prompting sam to address it separately. A second fix was applied in commit 252cbd8, resolving both issues. jomaxro acknowledges the merge was premature, but sam confirms the outcome is better with two bugs fixed instead of one.
In cases where a member isn’t allowed to post, the composer should not open under any circumstances.
Currently if TL settings are set so that TL0 isn’t allowed to post, hitting C opens the composer window.
This was reported a week ago by @SidV in Composer appears when the topic is closed, which was specific to closed topics. Closed the other topic as this report is broader.
We should fix this @sam. Why is it avoiding the normal code paths here? This smells bad.
Cause it does this:
createTopic() {
this.container.lookup('controller:composer').open({action: Composer.CREATE_TOPIC, draftKey: Composer.CREATE_TOPIC});
},
The permission itself is attached to the topic list serializer and category topic list serializer cause “can create topic” actually means “can create topic in current category” when you are drilled into a category. This info is not available when you are looking at a topic.
Current user serializer does not have a general “can create topics” on the forum. We would have to add it there.
Ok so this would need to be a 2.0 fix? Can the composer itself do a check and disable itself if it does not end up having permissions? Since composer is doing http calls anyways
Sam, that fixes only for creating topic, isn’t it?
Because on closed topics, if I press SHIFT + R, the composer appears.
That is a different bug though… hmmm not sure it was right to merge the two.
Will fix as well…
That’s my bad, sorry @sam.
For the best anyway cause now we have 2 less bugs instead of just 1
This topic was automatically closed after 30 hours. New replies are no longer allowed.