Do not redirect to consent page from a grid-only datagrid

Review Request #9980 — Created May 24, 2018 and submitted

brennie
Review Board
release-3.0.x
d72bb6f...
reviewboard

Datagrids periodically make requests to update themselves and replace
their content with the response content. If a user has datagrid open and
their consent decisions become invalid (i.e., they declined the privacy
policy in another tab or a new requirement was added), the next reload
of the datagrid will result in a redirect, causing the consent form to
be rendered inside the datagrid itself.

To correct for this situation, the valid_prefs_required now accepts a
disable_consent_checks argument which is a function that determines if
consent checks should be skipped for the current request. When this
argument is not provided, the decorator behaves as it did originally.
However, when it is provided, this check will be taken into account.

All datagrid views have been updated to use this new feature so that we
do not end up embedding the consent form in any datagrid.

Ran unit tests.

Description From Last Updated

F811 redefinition of unused 'test_with_consent_required_pending_consent_disabled_decorator' from line 1711

reviewbotreviewbot

Missing "Args" and "Returns".

chipx86chipx86
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

brennie
chipx86
  1. 
      
  2. reviewboard/datagrids/views.py (Diff revision 2)
     
     
     
     
     
     
     
     
     

    Missing "Args" and "Returns".

  3. 
      
brennie
chipx86
  1. Ship It!
  2. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (4db29c5)
Loading...