#561: Display more user-friendly error page when navigating to a non-existing
product
---------------------------+-----------------------
Reporter: rjollos | Owner: rjollos
Type: enhancement | Status: review
Priority: major | Milestone: Release 6
Component: multiproduct | Version:
Resolution: | Keywords: hooks
---------------------------+-----------------------
Comment (by rjollos):
Replying to [comment:15 rjollos]:
> At the moment we have (with some intermediate lines omitted for
brevity):
> {{{#!python
> req.perm.require('PRODUCT_VIEW')
> pid = req.args.get('productid', None)
> if pid:
> req.perm('product', pid).require('PRODUCT_VIEW')
> }}}
>
> Per the testing I've done, this is equivalent to:
> {{{#!python
> pid = req.args.get('productid', None)
> req.perm('product', pid).require('PRODUCT_VIEW')
> }}}
>
> Does that make sense?
Further investigation reveals that `req.perm.require('PRODUCT_VIEW')` in
necessary to avoid the nonsensical message: ''PRODUCT_VIEW privileges are
required to perform this operation on Product None. You don't have the
required permissions.'' when accessing `/products` or
`/products/prod1/products`.
> Also, a user can see the list of all products by accessing
`/products/prod1/products/`.
Please ignore this part. My previous testing was flawed.
--
Ticket URL: <https://issues.apache.org/bloodhound/ticket/561#comment:16>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker