Last Comment Bug 432905 - (bz-bugperm) Centralize bug viewing/editing permissions in the code
: Centralize bug viewing/editing permissions in the code
Status: NEW
: meta
Product: Bugzilla
Classification: Server Software
Component: Bugzilla-General (show other bugs)
: 3.1.4
: All All
-- enhancement (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
: default-qa
Depends on: 440606 527034 527037 440609 440612 440656
  Show dependency treegraph
Reported: 2008-05-08 16:23 PDT by Max Kanat-Alexander
Modified: 2012-11-15 14:35 PST (History)
4 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Description User image Max Kanat-Alexander 2008-05-08 16:23:28 PDT
The general idea here is to have a single function (or at least a set of functions) that determines whether or not a user can view/edit a bug, and that this function is used everywhere.

This is actually a request from NASA who want it for making plugins easier. I think it would also generally help the architecture of Bugzilla.

My current idea is to have something like:

$user->visible_bugs([id, id, id, id...])

$user->editable_bugs([id, id, id, id...])

The lower function in each set will call the higher function.

can_edit_bug will also check can_see_bug, so you won't have to call both.
Comment 1 User image Frédéric Buclin 2012-08-25 02:31:52 PDT
We are going to branch for Bugzilla 4.4 next week and this bug is either too invasive to be accepted for 4.4 at this point or shows no recent activity. The target milestone is reset and will be set again *only* when a patch is attached and approved.

I ask the assignee to reassign the bug to the default assignee if you don't plan to work on this bug in the near future, to make it clearer which bugs should be fixed by someone else.

Note You need to log in before you can comment on or make changes to this bug.