[OAuth2Provider] Added API and resource in front end to manage OAuth2 client apps
Review Request #7993 — Created Feb. 23, 2016 and discarded
This patch add full API support to get lists of OAuth2 client app, get, update or delete a single app instance or create a new one. User can also operate those operation through the webUI at My account page.
Ran python ./tests/runtests.py reviewboard.webapi.tests.test_oauth2_client_app
Test DELETE, GET, PUT on single item
Test GET, POST on list endpoint
Description | From | Last Updated |
---|---|---|
These should probably be rolled up into the change introducing this code. Same with all other relevant code. |
chipx86 | |
Should be "number". |
chipx86 | |
Blank line between these. |
chipx86 | |
Should be "string". |
chipx86 | |
No trailing comma. |
chipx86 | |
Should be rolled up into the change that introduces this. |
chipx86 | |
No trailing comma. |
chipx86 | |
No need for this. Instead, pass a this parameter to ready, and you'll be able to use this within the … |
chipx86 | |
Space before {. |
chipx86 | |
Please make sure you're following the proper styles and types for all these. |
chipx86 | |
You can't call gettext() on a variable. Only on literal strings. The saveButtonText and title values passed in must use … |
chipx86 | |
Blank line between these. |
chipx86 | |
Space before ( and after ). |
chipx86 | |
No trailing comma. |
chipx86 | |
Can't call gettext() on a variable. |
chipx86 | |
You can just bind to this._cancel. |
chipx86 | |
Should be more descriptive, like _onConfirmCancelClicked. Also, callback handlers should go after any other private functions. |
chipx86 | |
Multi-line comments must be in the form of: /* * line * line */ Also, these are wrapping too early. |
chipx86 | |
Indentation is wrong on the secnod line. Must indent only 4 spaces. Same below. |
chipx86 | |
Should be _$clientIdField. No capital C. |
chipx86 | |
This is too long. Instead, wrap like: this._$authorizationGrantTypeField = this._$selectAUthorizationGrantType.bindProperty( ...); |
chipx86 | |
Space before (. |
chipx86 | |
Should be something like _onSaveAppClicked. |
chipx86 | |
Blank line between these. |
chipx86 | |
This should all be done directly in render. |
chipx86 | |
This should probably be rolled back into the change introducing this. |
chipx86 | |
No trailing comma. |
chipx86 | |
No trailing comma. |
chipx86 | |
No trailing comma. |
chipx86 | |
Col: 80 E501 line too long (84 > 79 characters) |
reviewbot | |
Should all be in the same import group, in alphabetical order. |
chipx86 | |
These should not be in the same import group. |
chipx86 | |
'webapi_check_local_site' imported but unused |
reviewbot | |
Blank line between these. |
chipx86 | |
Col: 80 E501 line too long (92 > 79 characters) |
reviewbot | |
We probably want a has_list_access_permissions that prevents anyone but this user from accessing these apps. |
chipx86 | |
This should go into more detail about how to use this resource. This will be directly used in our online … |
chipx86 | |
Col: 27 E251 unexpected spaces around keyword / parameter equals |
reviewbot | |
No comma, since this is a function call. |
chipx86 | |
"client" This should also go into further details on the kind of updates that are allowed. |
chipx86 | |
Col: 80 E501 line too long (81 > 79 characters) |
reviewbot | |
Each keyword argument should actually be a keyword argument on the function, defaulting to None. |
chipx86 | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Missing docs. |
chipx86 | |
Blank line between these. |
chipx86 | |
Each keyword argument should actually be a keyword argument on the function. |
chipx86 | |
Blank line between these. |
chipx86 | |
Blank line between these. |
chipx86 | |
Blank line between these. |
chipx86 | |
'timezone' imported but unused |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (85 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (86 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (83 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (86 > 79 characters) |
reviewbot | |
Col: 5 E303 too many blank lines (2) |
reviewbot | |
Col: 69 W292 no newline at end of file |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot | |
Col: 80 E501 line too long (80 > 79 characters) |
reviewbot |
-
-
These should probably be rolled up into the change introducing this code. Same with all other relevant code.
-
-
-
-
-
-
-
No need for this. Instead, pass a
this
parameter toready
, and you'll be able to usethis
within the callback function.Like:
this.model.resource.ready({ ready: function() { ... } }, this);
-
-
-
You can't call
gettext()
on a variable. Only on literal strings. ThesaveButtonText
andtitle
values passed in must usegettext()
. -
-
-
-
-
-
Should be more descriptive, like
_onConfirmCancelClicked
.Also, callback handlers should go after any other private functions.
-
-
-
-
This is too long. Instead, wrap like:
this._$authorizationGrantTypeField = this._$selectAUthorizationGrantType.bindProperty( ...);
-
-
-
-
-
-
-
-
-
-
-
-
We probably want a
has_list_access_permissions
that prevents anyone but this user from accessing these apps. -
This should go into more detail about how to use this resource. This will be directly used in our online docs.
-
-
-
-
-
-
-
-
-
- Change Summary:
-
Add unit test for API. Update CR. Remove WIP status
- Summary:
-
[OAuth2Provider] [WIP] Added API and resource in front end to manage OAuth2 client apps[OAuth2Provider] Added API and resource in front end to manage OAuth2 client apps
- Testing Done:
-
~ Manual test only. I will push forward to build the feature since all CRs are in waiting anyway.
~ Ran python ./tests/runtests.py reviewboard.webapi.tests.test_oauth2_client_app
+ + Test DELETE, GET, PUT on single item
+ Test GET, POST on list endpoint - Diff:
-
Revision 2 (+877 -29)
-
Tool: Pyflakes Processed Files: reviewboard/webapi/tests/urls.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/resources/oauth2_client_app.py reviewboard/webapi/resources/oauth2_token.py reviewboard/webapi/tests/test_oauth2_client_app.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/user.py Ignored Files: reviewboard/static/rb/js/resources/models/oauth2ClientAppModel.js reviewboard/static/rb/js/accountPrefsPage/views/oauth2ClientAppsView.js Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/tests/urls.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/resources/oauth2_client_app.py reviewboard/webapi/resources/oauth2_token.py reviewboard/webapi/tests/test_oauth2_client_app.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/user.py Ignored Files: reviewboard/static/rb/js/resources/models/oauth2ClientAppModel.js reviewboard/static/rb/js/accountPrefsPage/views/oauth2ClientAppsView.js
-
-
-
-
-
-
-
-
-
-
- Change Summary:
-
Update pep8
- Diff:
-
Revision 3 (+880 -28)
-
Tool: Pyflakes Processed Files: reviewboard/webapi/tests/urls.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/resources/oauth2_client_app.py reviewboard/webapi/resources/oauth2_token.py reviewboard/webapi/tests/test_oauth2_client_app.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/user.py Ignored Files: reviewboard/static/rb/js/resources/models/oauth2ClientAppModel.js reviewboard/static/rb/js/accountPrefsPage/views/oauth2ClientAppsView.js Tool: PEP8 Style Checker Processed Files: reviewboard/webapi/tests/urls.py reviewboard/webapi/resources/__init__.py reviewboard/webapi/resources/oauth2_client_app.py reviewboard/webapi/resources/oauth2_token.py reviewboard/webapi/tests/test_oauth2_client_app.py reviewboard/webapi/tests/mimetypes.py reviewboard/webapi/resources/user.py Ignored Files: reviewboard/static/rb/js/resources/models/oauth2ClientAppModel.js reviewboard/static/rb/js/accountPrefsPage/views/oauth2ClientAppsView.js
-
-
-