Skip to content

Personal access token api and impersonation token

What does this MR do?

It adds the impersonation token and the management of the personal access tokens through api.

Are there points in the code the reviewer needs to double check?

Maybe he should double check in lib/gitlab/auth.rb. Thanks in advance @smcgivern :)

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Please see https://gitlab.com/gitlab-org/gitlab-ce/issues/25367.

Screenshot

/profile/personal_access_tokens

before

Screen_Shot_2017-01-06_at_14.53.46

after

Screen_Shot_2017-01-06_at_14.55.36

/admin/users/:username

before

Screen_Shot_2017-01-06_at_14.57.48

after

without any tokens

Screen_Shot_2017-01-07_at_18.06.06

after creating one token

Screen_Shot_2017-01-07_at_18.05.02

with every type of token

Screen_Shot_2017-01-07_at_18.04.24

after revoking one token

Screen_Shot_2017-01-07_at_18.06.38

Some notes:

  • I change the expires_at field from datetime to date because I see that every expiration date is a date.
  • I included the concern expirable in personal_access_token.

Merge request reports