mirror of
https://github.com/go-gitea/gitea.git
synced 2025-12-15 18:52:56 +00:00
Refactor Actions Token Access (#35688)
* use a single function to do Action Tokens Permission checks * allows easier customization * add basic tests * lfs file locks should work now --------- Signed-off-by: ChristopherHX <christopher.homberger@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -771,7 +771,7 @@ func ToOAuth2Application(app *auth.OAuth2Application) *api.OAuth2Application {
|
||||
|
||||
// ToLFSLock convert a LFSLock to api.LFSLock
|
||||
func ToLFSLock(ctx context.Context, l *git_model.LFSLock) *api.LFSLock {
|
||||
u, err := user_model.GetUserByID(ctx, l.OwnerID)
|
||||
u, err := user_model.GetPossibleUserByID(ctx, l.OwnerID)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user