refs PLAT-2708
Test Plan:
- Create a developer key through the Canvas UI and
verify that a new vendor code text input is
available and optional.
- Verify each of the following:
* If a vendor is associated with a devloper key they
must use one of the associated developer keys
when registering.
* If a vendor is associated with a developer key
they may not register without using a
developer key.
* If a vendor is associated with a developer key
they may not use a developer key other than
one they are associated with to register.
* If a vendor is not associated with a developer key
they must register without a developer key.
Change-Id: I9c9974706f542c1442988634790656da1c407cb8
Reviewed-on: https://gerrit.instructure.com/118592
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Jesse Poulos <jpoulos@instructure.com>
This commit enhances the Developer Keys page in two ways:
Notes field:
A notes field is added on the `developer_keys` table. When creating a
key, there is sometimes a need to record more information (for example,
a ticket number for the request, information on how the key is to be
used, etc). The notes field is exposed in the developer key listing, in
the API response, and in the dialog for creating/editing a key.
Usage stats:
While adding the notes field, I found a `TODO` marker for "add some
better stats here, like token count, last usage, etc.". Mark that `TODO`
as `DONE`! This PR adds two methods to the `DeveloperKey` model:
`access_token_count` and `last_used_at`. These fields are returned in
the API response, and are displayed in the Stats column on the Developer
Key page.
Test Plan:
- Add a new developer key. There should be a notes field present in the
form and it should save the value of the field when creating the key.
- Edit the key; you should be able to update the notes field.
- Assign access tokens using the developer key. The usage information
should be reflected in the stats for that key.
fixes CNVS-30433
and match them exactly
test plan:
* edit an existing developer key
* it should list both a legacy redirect URI, and a place
to put multiple redirect URIs
* add some URIs to it and save
* reload the page, and edit again
* they should be there
* add a new developer key
* it should not have a place to put legacy redirect URI
* save, refresh, edit, and it still shouldn't
Change-Id: Ie61c9b4026ca675df8f64d660480e52fafff0c57
Reviewed-on: https://gerrit.instructure.com/76990
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
Fixes PLAT-1232
test plan:
* go to developer keys UI
* you should be to deactive and reactivate keys
* deactivate a key that you have a token for
* the token should no longer work, even though it's not expired
Change-Id: I7388226c710ab0841692902886a49146a037e615
Reviewed-on: https://gerrit.instructure.com/50008
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
Account admins can now create developer keys for the domain root
accounts
Fixes PLAT-1190
Test Plan:
You should now be able to create developer key as an account admin
make sure the account admin can't access other accounts dev keys
Change-Id: I79b9c825521a980a8822693a316fdb9937340557
Reviewed-on: https://gerrit.instructure.com/61172
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
Site admins can manage developer keys. This provides a
basic interface for allowing key management. Admins can
add new keys, edit existing keys, etc. Also adds an
icon url for each key. If keys have an icon url, then
the oauth screen will display this icon to end-users.
test plan:
- manually add a key from the "developer keys" page in
the site admin account
- confirm that the key is created correctly
- edit the key
- confirm that the changes persist
- delete the key
- confirm that the key is properly deleted
- create more than 15 developer keys
- confirm that the page properly paginates
- set an icon url for a key
- do the oauth dance
- confirm that the icon appears in the approval step
- do the oauth dance for a key without an icon url
- confirm that no icon appears in the approval step
Change-Id: I5d64d14974fdcef8be21c6aa84ab13f681217bd7
Reviewed-on: https://gerrit.instructure.com/10979
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>