View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0005702||mantisbt||security||public||2005-06-02 08:21||2017-05-19 03:24|
|Target Version||Fixed in Version|
|Summary||0005702: Giving access to user who is monitoring bug|
Let's say we hve private project. User 1 (REPORTER) has added a private issue. administrator decided to send reminder to User 2 (REPORTER) of issue reported by user1. User 2 is monitoring issue but he do not have access to it.
It would be nice if administrator has an option to allow user2 to view private issue1.
I changed a lot in my conf files and .php files so please check out on "clean" mantis version
|Tags||No tags attached.|
|related to||0007642||new||Sending reminder from private issue should grant person rights to view this issue|
|related to||0007584||new||Add reporter to view private bugs|
|has duplicate||0005701||closed||vboctor||Giving access to user who is monitoring bug|
|has duplicate||0004763||closed||dregad||Allow monitor access to private bug in private project|
|has duplicate||0015505||closed||dregad||'Monitor'-ing on a private issue is not working|
|related to||0015466||new||Reporter can't see an issue they have been made a monitor of|
This can probably be easily implemented by modifying access_has_bug_level() to check if the user is monitoring the issue, the same way it currently checks if the user is the reporter of the issue.
Whether this is to be configurable or not, will need to be decided.
The change I proposed above will only provide the user access to the issue, if he enters Jump to Issue, or clicks on a link in an email. It will not add it to the list of issues the user can see in the View Issues page (i.e. as a result of a query). Changing the filtering to return these issues can be down, but it will slow down the query.
Yes i did it before reporting. At first I modified access_has_bug_level(), but as You noticed the bug is not displayed in my_view_page so i changed query. Thanks for checking out and still I think it would be nice featue to assign rights to certaing bugs.
Would be a nice to have
w_moroz, can you describe changes you did?
You will need to change access_has_bug_level() but that's not the only place. The mass queries for the My View and View Issues pages will probably need to construct different queries to ensure that you don't miss anything.
There are actually three cases I can think of offhand where adding monitors as a way of implementing access control lists could make varying amounts of sense:
There would also be interactions with the reminders feature (which has its own access level options!) but I think the general principle should hold that if you can't already see a bug, you should not be able to Monitor it; but once you can see a bug, it's an open question (and probably yet more configuration options) as to how much additional access you should need to send reminders and add people as Monitors. (On one end of the spectrum, people granted access via Monitoring would be able to add others as Monitors; on the other end, only those with manager access to the bug -- or configurable/administrator! -- would be able to add Monitors that create exceptions to the normal access levels.)
I recently ran into the same requirement and as this ticket has been around since 2005 without a solution I hacked one myself. In case someone needs it here's what I did in mantis 1.2.17:
in core/access_api.php function access_has_bug_level
$result = db_query_bound($query, Array($p_bug_id, $p_user_id));
in core/filter_api.php function filter_get_bug_rows
Using a subquery might not be the most elegant way, but it worked without major code changes. For a release this might also require a configuration switch.
I needed this feature too since I have some reports which must be visible nominatively (addition as monitor being a perfect for this). So, I successfully applied the cwipll's code, above, in a MantiBT 1.2.14.
Just a point to take care of (obvious, but easy to forgot) : $t_access_level must be defined before (ie. above) the inserted code in core/access_api.php's access_has_bug_level function. Otherwise, the bug is well visible in the "View issues" page, but still unreachable (access denied).
Would be nice feature. Can be done as config option - enable or disable this feature to satisfy everyone.
|2005-06-02 08:21||w_moroz||New Issue|
|2005-06-02 09:13||vboctor||Relationship added||has duplicate 0005701|
|2005-06-03 04:42||vboctor||Note Added: 0010340|
|2005-06-03 04:42||vboctor||Status||new => acknowledged|
|2005-06-03 04:45||vboctor||Note Added: 0010341|
|2005-06-03 05:43||w_moroz||Note Added: 0010343|
|2011-02-17 08:00||istvanb||Note Added: 0028251|
|2011-07-15 04:46||jas0n||Note Added: 0029175|
|2011-07-15 04:47||jas0n||Note Edited: 0029175||View Revisions|
|2011-08-11 00:04||toddpw||Note Added: 0029458|
|2011-08-11 03:38||dregad||Relationship added||has duplicate 0004763|
|2013-02-06 10:52||atrol||Relationship added||related to 0007642|
|2013-02-06 10:52||atrol||Relationship added||related to 0007584|
|2013-02-06 10:54||atrol||Relationship added||related to 0015466|
|2013-02-14 15:15||dregad||Relationship added||has duplicate 0015505|
|2015-07-15 14:52||cwipll||Note Added: 0051073|
|2015-12-03 10:00||0xFF||Note Added: 0052003|
|2017-05-19 03:24||aavagyan||Note Added: 0056904|