Normalize scope before storing in database
This commit is contained in:
parent
1ebfc83bb2
commit
b751682bc0
1 changed files with 2 additions and 1 deletions
|
@ -444,7 +444,8 @@ func (f *NewAccessTokenForm) GetScope() auth_model.AccessTokenScope {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
scope = strings.TrimSuffix(scope, ",")
|
scope = strings.TrimSuffix(scope, ",")
|
||||||
return auth_model.AccessTokenScope(scope)
|
s, _ := auth_model.AccessTokenScope(scope).Normalize() // error should not happen, since fields are valid scopes
|
||||||
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
// EditOAuth2ApplicationForm form for editing oauth2 applications
|
// EditOAuth2ApplicationForm form for editing oauth2 applications
|
||||||
|
|
Loading…
Add table
Reference in a new issue