Skip to content

fix: show project settings in read-only mode for developers#3011

Merged
HarshMN2345 merged 2 commits intomainfrom
fix-readonly-project-settings-developer
Apr 29, 2026
Merged

fix: show project settings in read-only mode for developers#3011
HarshMN2345 merged 2 commits intomainfrom
fix-readonly-project-settings-developer

Conversation

@HarshMN2345
Copy link
Copy Markdown
Member

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

image

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

@HarshMN2345 HarshMN2345 requested a review from Meldiron April 29, 2026 08:40
@appwrite
Copy link
Copy Markdown

appwrite Bot commented Apr 29, 2026

Console (appwrite/console)

Project ID: 688b7bf400350cbd60e9

Sites (1)
Site Status Logs Preview QR
 console-stage
688b7cf6003b1842c9dc
Ready Ready View Logs Preview URL QR Code

Tip

Function builds can take up to 45 minutes before timing out

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR exposes the project settings page to developers (users without projects.write) in a read-only mode rather than hiding it entirely. All interactive controls are disabled via !$canWriteProjects, an informational alert is shown at the top, and the data-load is hardened to silently return empty results on 401/403 while still surfacing other errors.

Confidence Score: 5/5

Safe to merge — changes are purely additive UI guards with no risk of data mutation for read-only users.

All interactive elements across every affected component are correctly disabled for non-writers. The load function properly re-throws non-permission errors. The previous concern about Promise.allSettled silently swallowing all failures has been fully addressed with targeted 401/403 handling. No P1 or P0 issues found.

No files require special attention.

Important Files Changed

Filename Overview
src/routes/(console)/project-[region]-[project]/settings/+page.ts Switches to Promise.allSettled with targeted 401/403 suppression so read-only users see empty data instead of an error page, while genuine failures still surface.
src/routes/(console)/project-[region]-[project]/settings/+page.svelte Unconditionally renders all settings sections, adds a read-only info banner for non-writers, and passes disabled={!$canWriteProjects} to UpdateVariables; also migrates from export let data to $props() rune.
src/routes/(console)/project-[region]-[project]/+layout.ts Skips console-access fingerprint tracking for users without projects.write to avoid an unauthorized write call.
src/routes/(console)/project-[region]-[project]/updateVariables.svelte Adds a disabled prop; gates all action buttons (Editor, Import, Create, per-row dots menu) with both {disabled} prop and runtime guard, and forwards disabled to the Empty state card.
src/routes/(console)/project-[region]-[project]/settings/updateInstallations.svelte Adds disabled={!$canWriteProjects} to the Add installation FormButton, per-row action button, and the empty-state Connect to GitHub button.
src/routes/(console)/project-[region]-[project]/settings/updateProtocols.svelte Guards Enable all / Disable all buttons, individual protocol toggles, and the dialog confirm button with !$canWriteProjects.
src/routes/(console)/project-[region]-[project]/settings/updateServices.svelte Same pattern as updateProtocols: guards all action buttons and individual service toggles with !$canWriteProjects.
src/routes/(console)/project-[region]-[project]/settings/updateName.svelte Removes the canWriteProjects conditional wrapper; disables the InputText and Update button individually for read-only users.
src/routes/(console)/project-[region]-[project]/settings/updateLabels.svelte Disables the tag input, adds an early-return guard to suggested-label click handlers, and disables the Update button for read-only users.
src/routes/(console)/project-[region]-[project]/settings/changeOrganization.svelte Disables the organization Select and Move button for users without projects.write.
src/routes/(console)/project-[region]-[project]/settings/deleteProject.svelte Disables the Delete button for users without projects.write, preventing the delete modal from opening.

Reviews (2): Last reviewed commit: "fix: only silence readonly settings perm..." | Re-trigger Greptile

Comment thread src/routes/(console)/project-[region]-[project]/settings/+page.ts Outdated
Comment on lines +23 to +37
const variables =
variablesResult.status === 'fulfilled'
? variablesResult.value
: {
total: 0,
variables: []
};

const installations =
installationsResult.status === 'fulfilled'
? installationsResult.value
: {
total: 0,
installations: []
};
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets add comment explaining why we silence errors - what kind of error is intentionally silenced. If possible, let's scope it to that error only

@HarshMN2345 HarshMN2345 merged commit 9f5cd5b into main Apr 29, 2026
3 of 4 checks passed
@HarshMN2345 HarshMN2345 deleted the fix-readonly-project-settings-developer branch April 29, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants