Skip to content

Commit

Permalink
Remove legacy handling of drone token (#8191)
Browse files Browse the repository at this point in the history
Now Drone has removed Gitea user/pass handling we can remove legacy handling
  • Loading branch information
techknowlogick authored and lafriks committed Sep 17, 2019
1 parent eec997d commit a60d3cb
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions routers/api/v1/user/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ func ListAccessTokens(ctx *context.APIContext) {

apiTokens := make([]*api.AccessToken, len(tokens))
for i := range tokens {
if tokens[i].Name == "drone" {
tokens[i].Name = "drone-legacy-use-oauth2-instead"
}
apiTokens[i] = &api.AccessToken{
ID: tokens[i].ID,
Name: tokens[i].Name,
Expand Down Expand Up @@ -78,9 +75,6 @@ func CreateAccessToken(ctx *context.APIContext, form api.CreateAccessTokenOption
UID: ctx.User.ID,
Name: form.Name,
}
if t.Name == "drone" {
t.Name = "drone-legacy-use-oauth2-instead"
}
if err := models.NewAccessToken(t); err != nil {
ctx.Error(500, "NewAccessToken", err)
return
Expand Down

0 comments on commit a60d3cb

Please sign in to comment.