Show lock owner instead of repo owner on LFS setting page (#31788)

Fix #31784.

Before:

<img width="1648" alt="image"
src="https://github.com/user-attachments/assets/03f32545-4a85-42ed-bafc-2b193a5d8023">

After:

<img width="1653" alt="image"
src="https://github.com/user-attachments/assets/e5bcaf93-49cb-421f-aac1-5122bc488b02">

(cherry picked from commit 0470646d46f90c20f40fde718be6ef8d8c84ee2c)
This commit is contained in:
Jason Song 2024-08-11 22:48:20 +08:00 committed by Earl Warren
parent 4760c5029d
commit 7f1db1df3e
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
5 changed files with 162 additions and 10 deletions

View file

@ -95,6 +95,11 @@ func LFSLocks(ctx *context.Context) {
ctx.ServerError("LFSLocks", err)
return
}
if err := lfsLocks.LoadAttributes(ctx); err != nil {
ctx.ServerError("LFSLocks", err)
return
}
ctx.Data["LFSLocks"] = lfsLocks
if len(lfsLocks) == 0 {