#667: Error rendering forbidden pages
------------------------+---------------------------------
  Reporter:  olemis     |      Owner:  rjollos
      Type:  defect     |     Status:  review
  Priority:  blocker    |  Milestone:  Release 8
 Component:  ui design  |    Version:  0.7.0
Resolution:             |   Keywords:  permissions, chrome
------------------------+---------------------------------

Comment (by olemis):

 Replying to [comment:9 rjollos]:
 > The patch appears to be effectively the same as the one in comment:3.

 Yes , it's very similar. I just almost imported it in my patch queue and
 tweaked it slightly ... the new aspects have been coded in test cases etc
 , just to ensure I could reproduce the issue and check that it will be
 fixed as a consequence of applying submitted patch

 > Is there a difference I'm not seeing, or just style differences?

 two subtle differences ...

 > I'm fine with using the `.get('mainnav', []))` since I think it's
 cleaner.
 >

 ... this is the first one

 > Is the `setdefault` needed? There won't be any iteration if `mainnav`
 isn't in the dictionary, so it doesn't appear that the line with
 `setdefault` would even be hit.

 Notice that the `setdefault` is for `metanav` key (instead of `mainnav`) .
 This issue is caused by processing an empty main nav , so I'm just
 protecting against cases when `metanav` might be probably empty as well
 (if that's possible at all) and , under such circumstances, bind an empty
 list to that key before appending `admin` item.

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

Reply via email to