Bug 432905 (bz-bugperm)

Centralize bug viewing/editing permissions in the code

NEW
Unassigned

Status

()

Bugzilla
Bugzilla-General
--
enhancement
9 years ago
5 years ago

People

(Reporter: Max Kanat-Alexander, Unassigned)

Tracking

(Depends on: 3 bugs, {meta})

Dependency tree / graph

Details

(Reporter)

Description

9 years ago
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.
(Reporter)

Updated

9 years ago
Assignee: general → mkanat
(Reporter)

Updated

9 years ago
Alias: bz-bugperm
(Reporter)

Updated

9 years ago
Depends on: 440606
(Reporter)

Updated

9 years ago
Depends on: 440609
(Reporter)

Updated

9 years ago
Depends on: 440612
(Reporter)

Updated

9 years ago
Depends on: 440656
Depends on: 527034, 527037

Comment 1

5 years ago
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 → ---

Updated

5 years ago
Assignee: mkanat → general
You need to log in before you can comment on or make changes to this bug.