Open Bug 432905 (bz-bugperm) Opened 16 years ago Updated 2 months ago

Centralize bug viewing/editing permissions in the code

Categories

(Bugzilla :: Bugzilla-General, enhancement)

3.1.4
enhancement
Not set
normal

Tracking

()

People

(Reporter: mkanat, Unassigned)

References

(Depends on 3 open bugs)

Details

(Keywords: meta)

Attachments

(1 obsolete file)

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->can_see_bug(id)

$user->editable_bugs([id, id, id, id...])
$user->can_edit_bug(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.
Assignee: general → mkanat
Alias: bz-bugperm
Depends on: 440606
Depends on: 440609
Depends on: 440612
Depends on: 440656
Depends on: 527034, 527037
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.
Target Milestone: Bugzilla 4.4 → ---
Assignee: mkanat → general
Attachment #9385012 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: