Defect #11872
closedPrivate issue visible to anonymous users after its author is deleted
0%
Description
The attached patch fixes defect #10148.
Specifically, suppose an anonymous (= not logged in) user submits an issue. Or alternatively, a user submits an issue, but later that user's account is deleted (in that case the issue is marked as submitted by anonymous).
Suppose further that the issue is marked as private. Then logged in users w/o the require permissions are not able to view the issue, as it is private.
But non-logged in users are able to view it. That is so because the code logic always allows the user who submitted a report to view it... Which in this particular case does not really make sense. The first part of the attached patch addresses this.
The second part fixes a minor bug in the allowed_to? method, which used to use "detect" instead of "any?", causing it to sometimes return a role object instead of a boolean.
Files
Related issues