View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0033404 | mantisbt | authorization | public | 2023-12-04 16:44 | 2025-04-08 03:00 |
Reporter | vboctor | Assigned To | atrol | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.26.0 | ||||
Target Version | 2.26.1 | Fixed in Version | 2.26.1 | ||
Summary | 0033404: Unable to grant user access to private issue by adding them as a monitoring user | ||||
Description | It looks like the fix for 0029454 caused a regression in 2.26.0 release. In 2.25, it was possible to add a user to a private issue to give them access to it, with the new changes, they need to already have access to get added as a monitor. It seems that we need to verify that they have some level of access (view_bug_threshold?) to the project (not the issue) before getting added as a monitor, but not necessarily have access to the issue itself they are being added to, since the goal may be to give them access to the issue. It is also not clear to me why access_has_limited_view() checks report_bug_threshold vs view_bug_threshold. | ||||
Tags | No tags attached. | ||||
related to | 0029454 | closed | atrol | monitor receives no mails if he is not project member |
has duplicate | 0033342 | closed | dregad | cannot assign user to monitoring issues in public project (not assigned to him) |
has duplicate | 0033348 | closed | dregad | Application error #31 (access rights to monitor issue) |
related to | 0035683 | closed | dregad | Invite user to private issue |
It's now again possible in my WIP PR https://github.com/mantisbt/mantisbt/pull/1953/files
I am checking now for monitor_bug_threshold at project level, so with default settings, a reporter can be added. Need some more time to check how / if it worked in earlier versions. |
|
@vboctor I tried old 2.25.8 (the last released version without my changes around 0029454 in 2.26.0 ) Isn't it better to avoid adding users to the monitoring list, if they don't have access? |
|
@atrol I think the change to verify access to a project rather than an issue is the main bug as suggested in my description and addressed with the fix in the PR. I didn't work with limited view as much, but if a user is going to be able to access an issue after being added as a monitor, then it should be possible to add them as a monitor to give them such access to this specific issue. If they won't be able to access the issue even after they are added, then it makes sense to block the addition. |
|
Maybe this could be controlled by a config option ?
We could also consider additional tuning options, e.g. only allow if user has project-level access, display a warning/confirmation if user will be granted access... |
|
One aspect we must remember is that corner cases that allow the user access to issues complicate our regular filter logic for the View Issues page (and However, there is already some logic that enables access to monitoring users. See I would say that the fix that is in the PR already addresses the regression. If I find scenarios that were working before and stopped working, I will update this issue or open a new one. |
|
I just realized as I closed a few issues as duplicate of another, private one, that the reporter of the resolved issue was added to the monitoring list of the duplicate, in spite of 0029454. See for example 0026434, the history of duplicate 0019381 shows
Strangely, for another issue #0033443, which already had a duplicate relationship with 0019381, the reporter was not added. |
|
@vboctor @atrol after re-reading this discussion and reviewing related issues and PR https://github.com/mantisbt/mantisbt/pull/1953, I think there is a misunderstanding between you. In the general usage scenario (i.e. when $g_limit_view_unless_threshold is set to its default value of ANYBODY), monitoring does not grant any visibility to an issue the user does not already have access to; I have tested and confirmed this is true in 2.26.0 as well as in earlier versions. Monitoring users do not get notification emails either. I believe this is the case that @atrol had in mind. On the other hand, and this is what was reported by @vboctor here as well as by other people in 0033342, 0033348, if $g_limit_view_unless_threshold is set e.g. to DEVELOPER, any users below that threshold will only see issues they reported or are monitoring - assuming they have access to the project of course. It is worth mentioning however, that this will not allow access to a private issue, or to issues belonging to a private project the user is not authorized to. This is a wider scenario, that should be tracked as a separate feature request. Anyway, in this context, we DO have a confirmed regression as it is no longer possible to add users to the monitoring list to grant them visibility on the issue. Maybe the access check to add a monitor can be smarter and take $g_limit_view_unless_threshold into account ? |
|