Skip to content

Commit a60d3cb

Browse files
techknowlogicklafriks
authored andcommitted
Remove legacy handling of drone token (#8191)
Now Drone has removed Gitea user/pass handling we can remove legacy handling
1 parent eec997d commit a60d3cb

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

routers/api/v1/user/app.go

-6
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ func ListAccessTokens(ctx *context.APIContext) {
3535

3636
apiTokens := make([]*api.AccessToken, len(tokens))
3737
for i := range tokens {
38-
if tokens[i].Name == "drone" {
39-
tokens[i].Name = "drone-legacy-use-oauth2-instead"
40-
}
4138
apiTokens[i] = &api.AccessToken{
4239
ID: tokens[i].ID,
4340
Name: tokens[i].Name,
@@ -78,9 +75,6 @@ func CreateAccessToken(ctx *context.APIContext, form api.CreateAccessTokenOption
7875
UID: ctx.User.ID,
7976
Name: form.Name,
8077
}
81-
if t.Name == "drone" {
82-
t.Name = "drone-legacy-use-oauth2-instead"
83-
}
8478
if err := models.NewAccessToken(t); err != nil {
8579
ctx.Error(500, "NewAccessToken", err)
8680
return

0 commit comments

Comments
 (0)