gitea/cmd
Yarden Shoham d36ddfe26c
Fix CLI allowing creation of access tokens with existing name ()
We are now:
- Making sure there is no existing access token with the same name
- Making sure the given scopes are valid (we already did this before but
now we have a message)

The logic is mostly taken from
a12a5f3652/routers/api/v1/user/app.go (L101-L123)

Closes 

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
..
actions.go Refactor to use urfave/cli/v2 ()
admin.go Add missing default value for some Bool cli flags ()
admin_auth_ldap.go Refactor to use urfave/cli/v2 ()
admin_auth_ldap_test.go Refactor to use urfave/cli/v2 ()
admin_user.go Refactor to use urfave/cli/v2 ()
admin_user_change_password.go Refactor to use urfave/cli/v2 ()
admin_user_create.go Refactor to use urfave/cli/v2 ()
admin_user_delete.go Refactor to use urfave/cli/v2 ()
admin_user_generate_access_token.go Fix CLI allowing creation of access tokens with existing name ()
admin_user_list.go Refactor to use urfave/cli/v2 ()
admin_user_must_change_password.go Refactor to use urfave/cli/v2 ()
cert.go Refactor to use urfave/cli/v2 ()
cmd.go Refactor to use urfave/cli/v2 ()
docs.go Refactor to use urfave/cli/v2 ()
doctor.go Improve "gitea doctor" sub-command and fix "help" commands ()
doctor_convert.go Improve "gitea doctor" sub-command and fix "help" commands ()
dump.go Refactor to use urfave/cli/v2 ()
dump_repo.go Refactor to use urfave/cli/v2 ()
embedded.go Refactor to use urfave/cli/v2 ()
generate.go Refactor to use urfave/cli/v2 ()
hook.go Refactor to use urfave/cli/v2 ()
hook_test.go Refactor internal API for git commands, use meaningful messages instead of "Internal Server Error" ()
keys.go Refactor to use urfave/cli/v2 ()
mailer.go Refactor to use urfave/cli/v2 ()
main.go Improve "gitea doctor" sub-command and fix "help" commands ()
main_test.go Refactor to use urfave/cli/v2 ()
manager.go Refactor to use urfave/cli/v2 ()
manager_logging.go Add missing default value for some Bool cli flags ()
migrate.go Refactor to use urfave/cli/v2 ()
migrate_storage.go Refactor to use urfave/cli/v2 ()
migrate_storage_test.go Fix all possible setting error related storages and added some tests ()
restore_repo.go Refactor to use urfave/cli/v2 ()
serv.go Refactor to use urfave/cli/v2 ()
web.go Serve pre-defined files in "public", add "security.txt", add CORS header for ".well-known" ()
web_acme.go Implement FSFE REUSE for golang files ()
web_graceful.go Implement FSFE REUSE for golang files ()
web_https.go Implement FSFE REUSE for golang files ()