snoopdave commented on code in PR #235:
URL: https://github.com/apache/roller/pull/235#discussion_r4492971912
##########
app/src/main/java/org/apache/roller/weblogger/ui/struts2/editor/EntryEdit.java:
##########
@@ -155,6 +158,9 @@ public String saveDraft() {
if (!requireEntry()) {
return INPUT;
}
+ if (!canWriteEntry()) {
Review Comment:
🐞Claude Issue: **Important:** `saveDraft()` and `publish()` run after the
validation and workflow interceptors, so a request that fails field validation
returns INPUT before `canWriteEntry()` runs, and the editor page renders the
stored entry. Moving the check into `myPrepare()` (clear `entry` and return
DENIED from the methods when the member can't write it) covers that path. A
test that posts `saveDraft` with an empty title for a published entry would
catch it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]