Closed
Bug 306325
Opened 19 years ago
Closed 19 years ago
Move CanEnterProduct() and CanEnterProductOrWarn() out of globals.pl
Categories
(Bugzilla :: Bugzilla-General, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 2.22
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file, 2 obsolete files)
15.33 KB,
patch
|
bugreport
:
review+
|
Details | Diff | Splinter Review |
These routines are user-specific and should go into User.pm; for instance: $user->can_enter_product($product_name).
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → Bugzilla 2.22
Assignee | ||
Comment 1•19 years ago
|
||
Also include GetEnterableProducts() as it depends on CanEnterProduct(). I will wait for bug 286158 to be checked in before moving these routines.
Assignee | ||
Comment 2•19 years ago
|
||
Attachment #194970 -
Flags: review?(bugreport)
Comment 3•19 years ago
|
||
Comment on attachment 194970 [details] [diff] [review] patch, v1 The new can_enter_product ignores ENTRY from group_control_map.
Attachment #194970 -
Flags: review?(bugreport) → review-
Assignee | ||
Comment 4•19 years ago
|
||
Attachment #194970 -
Attachment is obsolete: true
Attachment #197432 -
Flags: review?(bugreport)
Comment 5•19 years ago
|
||
Comment on attachment 197432 [details] [diff] [review] patch, v2 r=joel, but I want a 2xr on this and someone to run some serious QA tests on it.
Attachment #197432 -
Flags: review?(bugreport)
Attachment #197432 -
Flags: review?
Attachment #197432 -
Flags: review+
Assignee | ||
Comment 6•19 years ago
|
||
Comment on attachment 197432 [details] [diff] [review] patch, v2 wicked or mkanat, could you have a look at it?
Attachment #197432 -
Flags: review?(wicked)
Attachment #197432 -
Flags: review?(mkanat)
Attachment #197432 -
Flags: review?
Comment 7•19 years ago
|
||
Comment on attachment 197432 [details] [diff] [review] patch, v2 I nominate wicked. :-)
Attachment #197432 -
Flags: review?(mkanat)
Comment 8•19 years ago
|
||
Comment on attachment 197432 [details] [diff] [review] patch, v2 >Index: Bugzilla/User.pm >=================================================================== >RCS file: /cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v >+ if (!defined($product_name)) { >+ return unless $warn; Nit: I'd rather see this explicitly return 0 instead of undef/empty list/nothing depending on context. >+ if (!$has_access) { >+ return unless $warn; Nit: Ditto. >+ Description: Returns 1 if the user can enter bugs into the specified product. .. >+ - if $warn is false (or not given), a 'false' value is returned; Nit: Please be consistent, either 0/1 or false/true but not mixed like this. Probably best to use 0 and 1 everywhere. >+ Params: $product_name - a product name. >+ $warn - optional parameter, indicating whether an error >+ must be thrown if the user cannot enter bugs >+ into the specified product. Nit: Document also what values are needed to trigger which behaviour of $warn. >+ Returns: 1 if the user can enter bugs into the product, >+ 0 if the user cannot enter bugs into the product and if $warn >+ is false (an error is thrown if $warn is true). Nit: Can also return undef when user can't enter bugs into product because it has no components.
Attachment #197432 -
Flags: review?(wicked) → review+
Updated•19 years ago
|
Flags: approval?
Comment 9•19 years ago
|
||
Lpsolit: You'll need to make one further update to enter_bug.cgi that is not in your current patch as a result of bug 311489.
Assignee | ||
Comment 10•19 years ago
|
||
updated patch to take joel's patch into account (in enter_bug.cgi).
Attachment #197432 -
Attachment is obsolete: true
Attachment #199082 -
Flags: review?(bugreport)
Updated•19 years ago
|
Attachment #199082 -
Flags: review?(bugreport) → review+
Updated•19 years ago
|
Flags: approval? → approval+
Assignee | ||
Comment 11•19 years ago
|
||
Checking in buglist.cgi; /cvsroot/mozilla/webtools/bugzilla/buglist.cgi,v <-- buglist.cgi new revision: 1.313; previous revision: 1.312 done Checking in describecomponents.cgi; /cvsroot/mozilla/webtools/bugzilla/describecomponents.cgi,v <-- describecomponents.cgi new revision: 1.31; previous revision: 1.30 done Checking in enter_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/enter_bug.cgi,v <-- enter_bug.cgi new revision: 1.122; previous revision: 1.121 done Checking in globals.pl; /cvsroot/mozilla/webtools/bugzilla/globals.pl,v <-- globals.pl new revision: 1.342; previous revision: 1.341 done Checking in post_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/post_bug.cgi,v <-- post_bug.cgi new revision: 1.127; previous revision: 1.126 done Checking in process_bug.cgi; /cvsroot/mozilla/webtools/bugzilla/process_bug.cgi,v <-- process_bug.cgi new revision: 1.287; previous revision: 1.286 done Checking in Bugzilla/Bug.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Bug.pm,v <-- Bug.pm new revision: 1.97; previous revision: 1.96 done Checking in Bugzilla/User.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/User.pm,v <-- User.pm new revision: 1.87; previous revision: 1.86 done Checking in template/en/default/list/edit-multiple.html.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/list/edit-multiple.html.tmpl,v <-- edit-multiple.html.tmpl new revision: 1.31; previous revision: 1.30 done
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•