Beginning on October 25th, 2016, Persona will no longer be an option for authentication on BMO. For more details see Persona Deprecated.
Last Comment Bug 519835 - Bugzilla::Product::check_product() should be Bugzilla::Product->check()
: Bugzilla::Product::check_product() should be Bugzilla::Product->check()
Product: Bugzilla
Classification: Server Software
Component: Bugzilla-General (show other bugs)
: 3.5
: All All
: -- enhancement (vote)
: Bugzilla 4.0
Assigned To: Frédéric Buclin
: default-qa
Depends on:
  Show dependency treegraph
Reported: 2009-09-30 15:18 PDT by Frédéric Buclin
Modified: 2010-10-21 18:45 PDT (History)
1 user (show)
LpSolit: approval+
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

patch, v1 (8.96 KB, patch)
2010-07-06 12:06 PDT, Frédéric Buclin
no flags Details | Diff | Splinter Review
patch, v1.1 (8.97 KB, patch)
2010-07-06 12:14 PDT, Frédéric Buclin
mkanat: review-
Details | Diff | Splinter Review
patch, v2 (9.71 KB, patch)
2010-07-06 12:33 PDT, Frédéric Buclin
mkanat: review+
Details | Diff | Splinter Review
patch, v3 (9.81 KB, patch)
2010-07-06 12:54 PDT, Frédéric Buclin
LpSolit: review+
Details | Diff | Splinter Review

Description Frédéric Buclin 2009-09-30 15:18:03 PDT
check_product() in existed before We should now replace it by Object->check().
Comment 1 Frédéric Buclin 2010-07-06 12:06:35 PDT
Created attachment 456180 [details] [diff] [review]
patch, v1
Comment 2 Frédéric Buclin 2010-07-06 12:14:47 PDT
Created attachment 456181 [details] [diff] [review]
patch, v1.1

now with new({name => ...})
Comment 3 Max Kanat-Alexander 2010-07-06 12:17:41 PDT
Comment on attachment 456181 [details] [diff] [review]
patch, v1.1

Hmm. For the cases like editflagtypes.cgi, I'd rather have an argument to check() that bypasses the Product->check() and goes straight to Object->check.

So, perhaps something like Bugzilla::Product->check({ name => $name, allow_inaccessible => 1 });
Comment 4 Frédéric Buclin 2010-07-06 12:33:09 PDT
Created attachment 456185 [details] [diff] [review]
patch, v2
Comment 5 Max Kanat-Alexander 2010-07-06 12:41:50 PDT
Comment on attachment 456185 [details] [diff] [review]
patch, v2

This is fine, except that in the allow_inaccessible case, you don't want to throw the product_access_denied error, so you probably should "if" or "unless" that.
Comment 6 Frédéric Buclin 2010-07-06 12:54:58 PDT
Created attachment 456189 [details] [diff] [review]
patch, v3

Yeah, good idea. Carrying forward r+.
Comment 7 Frédéric Buclin 2010-07-06 18:59:28 PDT
Committing to: bzr+ssh://
modified config.cgi
modified editflagtypes.cgi
modified enter_bug.cgi
modified request.cgi
modified Bugzilla/
modified Bugzilla/
modified Bugzilla/
modified template/en/default/global/user-error.html.tmpl
Committed revision 7287.

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