Commit Graph

3 Commits

Author SHA1 Message Date
Cody Cutrer 809904d8b6 add frozen_string_literal comment to migrations
Change-Id: Idf4ddb29567c1dfab9f01b09c7a1056367ae7b44
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/261814
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2021-03-30 18:14:36 +00:00
Stewie (Nicholas Stewart) 5fa6bb57b9 Add copyright message to remaining .rb files
Update: Copyright years now reflect the year that the file was first
committed.

Refs: PLAT-3200

Test Plan: jenkins is still happy and specs pass!!

Change-Id: Ic26463defe41fc52cf4da8020976394c641f51d5
Reviewed-on: https://gerrit.instructure.com/143545
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
2018-03-19 13:38:50 +00:00
Graham Ballantyne e359c8d187 Add notes & additional stats to Developer Keys page
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.
2017-04-05 14:06:45 -07:00