Skip to content

Commit 107fb73

Browse files
committed
Check permission for the appropriate unit type
Fixes false positives for "User created Issues in Repository which they no longer have access to" errors
1 parent 126c933 commit 107fb73

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/user/home.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ func Issues(ctx *context.Context) {
551551
ctx.ServerError("GetUserRepoPermission", fmt.Errorf("[%d]%v", repoID, err))
552552
return
553553
}
554-
if !perm.CanRead(models.UnitTypeIssues) {
554+
if !perm.CanRead(unitType) {
555555
log.Error("User created Issues in Repository which they no longer have access to: [%d]", repoID)
556556
}
557557
}

0 commit comments

Comments
 (0)