Skip to content

The only tool you need to know what is happening and how to fix it.

backend: name the project role in the read-only 403

narrow-adventure3c5c7f0c41a1
diff --git a/backend/app/controllers/page.controller.go b/backend/app/controllers/page.controller.go
index 952623be..49f30faa 100644
--- a/backend/app/controllers/page.controller.go
+++ b/backend/app/controllers/page.controller.go
@@ -225,7 +225,7 @@ func (c *pageController) Resolve(ctx *gin.Context) {
return
}
if role == "readonly" || role == "" {
- ctx.AbortWithStatusJSON(http.StatusForbidden, gin.H{"error": "Read-only access. Archiving the issue is not permitted."})
+ ctx.AbortWithStatusJSON(http.StatusForbidden, gin.H{"error": "Your role in this project is read-only, so archiving the issue is not permitted."})
return
}
if err := telemetry.ExceptionStackTraceRepository.ArchiveByHashes(ctx, page.ProjectId, []string{hash}); err != nil {
@@ -353,7 +353,7 @@ func (c *pageController) BulkResolve(ctx *gin.Context) {
return
}
if role == "readonly" || role == "" {
- ctx.AbortWithStatusJSON(http.StatusForbidden, gin.H{"error": "Read-only access. Archiving the issues is not permitted."})
+ ctx.AbortWithStatusJSON(http.StatusForbidden, gin.H{"error": "Your role in this project is read-only, so archiving the issues is not permitted."})
return
}
hashes := make([]string, 0, len(hashSet))
diff --git a/backend/app/middleware/require_write_access.middleware.go b/backend/app/middleware/require_write_access.middleware.go
index 8d0a5302..6a7e99d7 100644
--- a/backend/app/middleware/require_write_access.middleware.go
+++ b/backend/app/middleware/require_write_access.middleware.go
@@ -40,7 +40,7 @@ func InitRequireWriteAccess() {
}
if role == "readonly" || role == "" {
- c.AbortWithStatusJSON(http.StatusForbidden, gin.H{"error": "Read-only access. Write operations are not permitted."})
+ c.AbortWithStatusJSON(http.StatusForbidden, gin.H{"error": "Your role in this project is read-only, so write operations are not permitted. An organization owner or admin can change it in Settings > Team Members."})
return
}