Add new CLI flags to set name and scopes when creating a user with access token (#34080)
Resolves #33474. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> (cherry picked from commit 55a69ae4c63ee8551eadb161cb901ba0a2a2e194)
This commit is contained in:
parent
02d9c7cd27
commit
f7b19964a7
4 changed files with 50 additions and 12 deletions
|
@ -49,6 +49,9 @@ func ApplicationsPost(ctx *context.Context) {
|
|||
ctx.ServerError("GetScope", err)
|
||||
return
|
||||
}
|
||||
if !scope.HasPermissionScope() {
|
||||
ctx.Flash.Error(ctx.Tr("settings.at_least_one_permission"), true)
|
||||
}
|
||||
t := &auth_model.AccessToken{
|
||||
UID: ctx.Doer.ID,
|
||||
Name: form.Name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue