Update access token form

This commit is contained in:
harryzcy 2022-09-06 23:19:26 -04:00
parent 6f4eed0912
commit 4fd1722ed4
No known key found for this signature in database
GPG key ID: CC2953E050C19686

View file

@ -368,7 +368,33 @@ func (f *AddKeyForm) Validate(req *http.Request, errs binding.Errors) binding.Er
// NewAccessTokenForm form for creating access token
type NewAccessTokenForm struct {
Name string `binding:"Required;MaxSize(255)"`
Name string `binding:"Required;MaxSize(255)"`
ScopeRepo bool
ScopeRepoStatus bool
ScopePublicRepo bool
ScopeAdminOrg bool
ScopeWriteOrg bool
ScopeReadOrg bool
ScopeAdminPublicKey bool
ScopeWritePublicKey bool
ScopeReadPublicKey bool
ScopeAdminRepoHook bool
ScopeWriteRepoHook bool
ScopeReadRepoHook bool
ScopeNotification bool
ScopeUser bool
ScopeReadUser bool
ScopeUserEmail bool
ScopeUserFollow bool
ScopeDeleteRepo bool
ScopePackage bool
ScopeWritePackage bool
ScopeReadPackage bool
ScopeDeletePackage bool
ScopeAdminGPGKey bool
ScopeWriteGPGKey bool
ScopeReadGPGKey bool
ScopeSudo bool
}
// Validate validates the fields