Skip to content

Commit f47296e

Browse files
authored
Merge pull request #204 from reqcore-inc/fix/demo-account-org-isolation
feat: enforce demo account isolation and organization access restrictions
2 parents 0276ae9 + d533052 commit f47296e

13 files changed

Lines changed: 811 additions & 455 deletions

File tree

.github/workflows/pr-validation.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
cache: npm
2929

3030
- name: Install dependencies
31+
id: install
3132
run: npm ci
3233

3334
- name: Run tests (if present)
@@ -40,7 +41,7 @@ jobs:
4041

4142
- name: Typecheck
4243
id: typecheck
43-
run: npx nuxi typecheck
44+
run: npm run typecheck
4445

4546
- name: Audit dependencies (high severity+)
4647
id: audit
@@ -67,7 +68,7 @@ jobs:
6768
6869
status_icon() { [ "$1" = "success" ] && echo "✅" || echo "❌"; }
6970
70-
echo "| Install dependencies | $(status_icon '${{ steps.tests.outcome != 'skipped' && 'success' || 'failure' }}') |" >> "$GITHUB_STEP_SUMMARY"
71+
echo "| Install dependencies | $(status_icon '${{ steps.install.outcome }}') ${{ steps.install.outcome }} |" >> "$GITHUB_STEP_SUMMARY"
7172
echo "| Tests | $(status_icon '${{ steps.tests.outcome }}') ${{ steps.tests.outcome }} |" >> "$GITHUB_STEP_SUMMARY"
7273
echo "| Lint | $(status_icon '${{ steps.lint.outcome }}') ${{ steps.lint.outcome }} |" >> "$GITHUB_STEP_SUMMARY"
7374
echo "| Typecheck | $(status_icon '${{ steps.typecheck.outcome }}') ${{ steps.typecheck.outcome }} |" >> "$GITHUB_STEP_SUMMARY"

app/pages/dashboard/settings/index.vue

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,17 @@ async function handleSaveOrg() {
6060
saveSuccess.value = false
6161
6262
try {
63-
await authClient.organization.update({
63+
const result = await authClient.organization.update({
6464
data: {
6565
name: trimmedName,
6666
slug: trimmedSlug,
6767
},
6868
})
69+
70+
if (result.error) {
71+
throw new Error(result.error.message || 'Failed to update organization')
72+
}
73+
6974
track('org_settings_saved')
7075
saveSuccess.value = true
7176
setTimeout(() => { saveSuccess.value = false }, 3000)
@@ -97,10 +102,15 @@ async function handleDeleteOrg() {
97102
deleteError.value = ''
98103
99104
try {
100-
track('org_deleted')
101-
await authClient.organization.delete({
105+
const result = await authClient.organization.delete({
102106
organizationId: activeOrg.value!.id,
103107
})
108+
109+
if (result.error) {
110+
throw new Error(result.error.message || 'Failed to delete organization')
111+
}
112+
113+
track('org_deleted')
104114
// Use navigateTo for Nuxt-managed navigation, then force reload
105115
// so all cached org state is cleared.
106116
const localePath = useLocalePath()

0 commit comments

Comments
 (0)