Inherit from API mixins in all resources

Review Request #9125 - Created Aug. 11, 2017 and updated

Barret Rennie
Review Board
release-3.0.x
e8b134c...
reviewboard

Previously the extension and validation resources did not inherit from
the API token mixin nor the OAuth2 token mixin, making them inaccessible
via these methods. This was becuase they were not using our base
resource class due to being special cases of resources from Djblets.

Now we have a new RBResourceMixin that includes all mixins that Review
Board resources should inherit from. Resources defined by Review Board
will inherit them through our base WebAPIResource, but this mixin will
also allow us to use all these mixins in resources we bring in from,
e.g., Djblets.

The new extension resource explicitly inherits from this mixin, as does
the validation resource, allowing them to be accessed via OAuth2 tokens
and API token.

Ran unit tests.

  • 3
  • 2
  • 0
  • 5
Description From Last Updated
"subclasses" Christian Hammond Christian Hammond
You shouldn't need this. If the method doesn't provide docs, the augmented method's docs are used. Christian Hammond Christian Hammond
Typo in the description: "becuase" Christian Hammond Christian Hammond
Barret Rennie
Barret Rennie
Review request changed

Change Summary:

fix imports

Commit:

-45bc2807f43afab5ba55a35f08faf8729c350719
+e8b134c0d3eae986ee2a2df7c30e1aa2d598a9b0

Diff:

Revision 3 (+43 -11)

Show changes

Checks run (2 succeeded)

JSHint passed.
flake8 passed.
Christian Hammond
  1. 
      
  2. Typo in the description: "becuase"

  3. reviewboard/webapi/base.py (Diff revision 3)
     
     

    "subclasses"

  4. You shouldn't need this. If the method doesn't provide docs, the augmented method's docs are used.

  5. 
      
Loading...