Open
Bug 897835
Opened 11 years ago
Updated 2 years ago
Expose "can change field" information via the web services
Categories
(Bugzilla :: WebService, enhancement)
Tracking
()
REOPENED
People
(Reporter: erik.bryn, Unassigned)
Details
Attachments
(2 obsolete files)
I can get the list of groups (id, name, description) that the current user belongs to, but I'm unable to get further information about those groups. I need more information about the groups the user belongs to so I can determine whether they're able to edit a bug or not.
there's a lot more than just group membership that determines if a user can edit a bug. group membership is used primarily to control bug /visibility/ (although it isn't the only deciding factor). editing is controlled on a per-field basis, and for some fields (such as the firefox tracking flags), also on a per-value basis. group membership is generally used to control a field's editability (eg. you need canconfirm to change the status field for bugs which you didn't report), but even then there are other factors (eg. if comments are restricted on a bug). so we need to expose $bug->check_can_change_field()
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: No API for accessing information about groups → Expose "can change field" information via the web services
Updated•11 years ago
|
Status: NEW → ASSIGNED
QA Contact: dkl
Updated•11 years ago
|
Assignee: nobody → dkl
Severity: normal → enhancement
OS: Mac OS X → All
Hardware: x86 → All
Comment 2•11 years ago
|
||
Adds new webservice called Bug.can_change_fields which gives a true/false value for each field value depending on if the current user can change the field or not. POD to come once satisified with the design. Thanks dkl
Attachment #784806 -
Flags: review?(glob)
Comment on attachment 784806 [details] [diff] [review] 897835_1.patch Review of attachment 784806 [details] [diff] [review]: ----------------------------------------------------------------- this looks sane, but i can't test due to: -32000 Insecure dependency in parameter 1 of DBI::st=HASH(0x4b74160)->execute method call while running with -T switch at Bugzilla/User.pm line 927.
Attachment #784806 -
Flags: review?(glob) → review-
Comment 4•11 years ago
|
||
Let's do this as an upstream enhancement instead. This was originally filed as a BMO bug. Also I made the patch against bugzilla/trunk initially as I had it in my head it would be an upstream change before realizing this bug is against BMO. This would explain why you are getting the error and I am not. I will figure out why the patch fails on bmo/4.2 while we review it against upstream code as well. dkl
Component: API → WebService
Product: bugzilla.mozilla.org → Bugzilla
QA Contact: default-qa
Target Milestone: --- → Bugzilla 5.0
Version: Development/Staging → 4.5
Comment 5•11 years ago
|
||
This patch is against trunk so please test it there. It will only work against bmo/4.2 if I remove the preloading of visible_bugs permissions. I have another BMO bug waiting review to add support in for that (bug 899537). Changes 1. Added POD 2. Changed the return data to be more like Bug.comments and Bug.attachments. 3. Instead of using 'fields' as a param, just use the standard 'include_fields' and 'exclude_fields' to specify field names. dkl
Attachment #784806 -
Attachment is obsolete: true
Attachment #785221 -
Flags: review?(glob)
Updated•11 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Comment 7•11 years ago
|
||
Sorry mistakenly closed this as I was cleaning up prior bugs for the BMO Ember extension that were later re-implemented in bug 904988. Actually this function would still be useful as part of the core API so reopening. dkl
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Comment on attachment 785221 [details] [diff] [review] 897835_2.patch (trunk) we're going to hold off on implementing this request until the REST api redesign has happened.
Attachment #785221 -
Flags: review?(glob)
Attachment #785221 -
Attachment is obsolete: true
Updated•10 years ago
|
Target Milestone: Bugzilla 5.0 → ---
Updated•2 years ago
|
Assignee: dkl → webservice
You need to log in
before you can comment on or make changes to this bug.
Description
•