Commit Graph

9 Commits

Author SHA1 Message Date
Krasimir Angelov d745ff0431 Add username to deploy tokens
This new attribute is optional and used when set instead of the default
format `gitlab+deploy-token-#{id}`.

Empty usernames will be saved as null in the database.

Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/50228.
2019-07-02 18:56:48 +00:00
Thong Kuah 85b29c1c2f Add frozen_string_literal to spec/services
Probably useful as we often move these files to "new" files.
2019-04-12 10:14:54 +12:00
Thong Kuah 4ec16912b8 Autocorrect with RSpec/ExampleWording cop
- rewords examples starting with 'should'
- rewords examples starting with 'it'

Note: I had to manually fixup "onlies" to "only"
2019-04-05 08:43:27 +00:00
Mayra Cabrera 5bc58bac26 Handle limit for datetime attributes on MySQL
The TIMESTAMP data type is used for values that contain both date and
time parts. TIMESTAMP has a range of '1970-01-01 00:00:01' UTC to
'2038-01-19 03:14:07' UTC.

A Forever lib class was included to handle future dates for PostgreSQL
and MySQL, also changes were made to DeployToken to enforce Forever.date

Also removes extra conditional from JwtController
2018-04-06 22:28:44 -05:00
Mayra Cabrera 18a1569319 Handles default expires_at date directly into DeployToken model 2018-04-06 21:20:17 -05:00
Mayra Cabrera c4f56a8802 Increase test suite around deploy tokens behavior
Also, fixes broken specs
2018-04-06 21:20:17 -05:00
Mayra Cabrera 8315861c9a Include ProjectDeployTokens
Also:
- Changes scopes from serializer to use boolean columns
- Fixes broken specs
2018-04-06 21:20:16 -05:00
Mayra Cabrera 345ac03b7a Address UX review
- Keep 'Deploy Section' open upon save, otherwise the token might get
  lost
- When an error appears, display the error inside the form and also keep
  the Deploy Section open
- Changue copy of revoke modal
2018-04-06 21:20:16 -05:00
Mayra Cabrera db18993f65 Create barebones for Deploytoken
Includes:
- Model, factories, create service and controller actions
- As usual, includes specs for everything
- Builds UI (copy from PAT)
- Add revoke action

Closes #31591
2018-04-06 21:20:16 -05:00