- commit
- ab36563
- parent
- c595251
- author
- Eric Bower
- date
- 2024-10-08 22:15:37 +0000 UTC
chore(pgs): block site access when project is blocked
1 files changed,
+11,
-0
+11,
-0
1@@ -450,6 +450,17 @@ func ServeAsset(fname string, opts *storage.ImgProcessOpts, fromImgs bool, hasPe
2 return
3 }
4
5+ logger = logger.With(
6+ "projectId", project.ID,
7+ "project", project.Name,
8+ )
9+
10+ if project.Blocked != "" {
11+ logger.Error("project has been blocked")
12+ http.Error(w, project.Blocked, http.StatusForbidden)
13+ return
14+ }
15+
16 projectID = project.ID
17 projectDir = project.ProjectDir
18 if !hasPerm(project) {