#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:8 olemis]:
 > > However I can't find a way to cause the product view page to be
 displayed.
 >
 > Two options
 >
 >   1. /products/x/products/x
 >   2. set dashboard as default handler for product home page by using
 TracIni options

 Thanks, that clears up a lot. More questions on that later.

 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?

 I've also found a somewhat confusing scenario. Consider two products,
 `prod1` and `prod2`. If a user has permission to access `prod1`, they can
 view `/products/prod1/products/prod2` and what is displayed will be an
 "empty" dashboard, regardless of whether they permission to access
 `prod2`. Also, a user can see the list of all products by accessing
 `/products/prod1/products/`.

-- 
Ticket URL: <https://issues.apache.org/bloodhound/ticket/561#comment:15>
Apache Bloodhound <https://issues.apache.org/bloodhound/>
The Apache Bloodhound issue tracker

Reply via email to