Update copy for document and collection level permissions

This commit is contained in:
Vincent (Wen Yu) Ge
2024-03-13 10:01:26 +00:00
parent c43dd4b79d
commit 09a144fcb7
10 changed files with 54 additions and 49 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ export const bucketSearcher = (async (query: string) => {
icon: 'puzzle'
},
{
label: 'File Security',
label: 'File level permissions',
async callback() {
await goto(
`/console/project-${$project.$id}/storage/bucket-${bucket.$id}/settings#file-security`
@@ -163,7 +163,7 @@
icon: 'puzzle'
},
{
label: 'Document security',
label: 'Document level permissions',
async callback() {
await goto(
`/console/project-${$project.$id}/databases/database-${$database.$id}/collection-${$collection.$id}/settings#document-security`
@@ -83,11 +83,10 @@
{#if $collection.documentSecurity}
{#if showPermissionAlert}
<Alert type="info" dismissible on:dismiss={() => (showPermissionAlert = false)}>
<svelte:fragment slot="title">Document security is enabled</svelte:fragment>
<svelte:fragment slot="title">Document level permissions are enabled</svelte:fragment>
<p class="text">
Users will be able to access this document if they have been granted <b
>either document or collection permissions.
</b>
Users will be able to access this document if they have been granted
<b>either document or collection level permissions.</b>
</p>
</Alert>
{/if}
@@ -96,11 +95,11 @@
{/if}
{:else}
<Alert type="info">
<svelte:fragment slot="title">Document security is disabled</svelte:fragment>
<svelte:fragment slot="title">Document level permissions are disabled</svelte:fragment>
<p class="text">
If you want to assign document permissions. Go to Collection settings and
enable document security. Otherwise, only collection permissions will be
used.
If you want to assign different permissions to individual documents. Go to
you collection's settings and enable document level permissions. Otherwise,
all documents in the collection share the same collection level permissions.
</p>
</Alert>
{/if}
@@ -45,22 +45,23 @@
</script>
<CardGrid>
<Heading tag="h6" size="7" id="document-security">Document security</Heading>
<Heading tag="h6" size="7" id="document-security">Document level permissions</Heading>
<svelte:fragment slot="aside">
<FormList>
<InputSwitch
bind:value={collectionDocumentSecurity}
id="security"
label="Document security" />
label="Document level permissions" />
</FormList>
<p class="text">
When document security is enabled, users will be able to access documents for which they
have been granted <b>either document or collection permissions</b>.
When document level permissions are enabled, users will be able to access documents for which they
have been granted <b>either document or collection level permissions</b>.
</p>
<p class="text">
If document security is disabled, users can access documents <b
>only if they have collection permissions</b
>. Document permissions will be ignored.
When document level permissions are disabled, users can only access
documents <b>if they have been granted collection level
permissions</b>. You will not be able to assign different permissions
to individual documents.
</p>
</svelte:fragment>
<svelte:fragment slot="actions">
@@ -20,9 +20,9 @@
{#if $collection.documentSecurity}
<div class="common-section">
<Alert type="info">
<svelte:fragment slot="title">Document security is enabled</svelte:fragment>
Users will be able to access this document if they have been granted
<b>either document or collection permissions</b>.
<svelte:fragment slot="title">Document level permissions are enabled</svelte:fragment>
Users will be able to access this document if they have been granted
<b>either document or collection level permissions.</b>
</Alert>
</div>
<div class="common-section">
@@ -30,9 +30,10 @@
</div>
{:else}
<Alert type="info">
<svelte:fragment slot="title">Document security is disabled</svelte:fragment>
If you want to assign document permissions, navigate to Collection settings and enable document
security. Otherwise, only collection permissions will be used.
<svelte:fragment slot="title">Document level permissions are disabled</svelte:fragment>
If you want to assign different permissions to individual documents. Go to
you collection's settings and enable document level permissions. Otherwise,
all documents in the collection share the same collection level permissions.
</Alert>
{/if}
</WizardStep>
@@ -46,7 +46,7 @@
icon: 'puzzle'
},
{
label: 'File security',
label: 'File level permissions',
async callback() {
await goto(
`/console/project-${$project.$id}/storage/bucket-${$bucket.$id}/settings#file-security`
@@ -21,9 +21,9 @@
{#if $bucket.fileSecurity}
<div class="common-section">
<Alert type="info">
<svelte:fragment slot="title">File security enabled</svelte:fragment>
Users will be able to access this file if they have been granted
<b>either File or Bucket permissions</b>.
<svelte:fragment slot="title">File level permissions enabled</svelte:fragment>
Users will be able to access this file if they have been granted
<b>either file or bucket level permissions.</b>
</Alert>
</div>
<div class="common-section">
@@ -31,9 +31,10 @@
</div>
{:else}
<Alert type="info">
<svelte:fragment slot="title">File security disabled</svelte:fragment>
If you want to assign file permissions, navigate to Bucket settings and enable file security.
Otherwise, only Bucket permissions will be used.
<svelte:fragment slot="title">File level permissions disabled</svelte:fragment>
If you want to assign different permissions to individual files. Go to
you bucket's settings and enable file level permissions. Otherwise,
all file in the bucket share the same bucket level permissions.
</Alert>
{/if}
</WizardStep>
@@ -82,9 +82,9 @@
{#if $bucket.fileSecurity}
<div class="common-section">
<Alert type="info">
<svelte:fragment slot="title">File security enabled</svelte:fragment>
Users will be able to access this file if they have been granted
<b>either File or Bucket permissions</b>.
<svelte:fragment slot="title">File level permissions enabled</svelte:fragment>
Users will be able to access this file if they have been granted
<b>either file or bucket level permissions.</b>
</Alert>
</div>
<div class="common-section">
@@ -92,9 +92,10 @@
</div>
{:else}
<Alert type="info">
<svelte:fragment slot="title">File security disabled</svelte:fragment>
If you want to assign file permissions, navigate to Bucket settings and enable file security.
Otherwise, only Bucket permissions will be used.
<svelte:fragment slot="title">File level permissions disabled</svelte:fragment>
If you want to assign different permissions to individual files. Go to
you bucket's settings and enable file level permissions. Otherwise,
all file in the bucket share the same bucket level permissions.
</Alert>
{/if}
</FormList>
@@ -123,10 +123,10 @@
{#if $bucket.fileSecurity}
{#if showFileAlert}
<Alert type="info" dismissible on:dismiss={() => (showFileAlert = false)}>
<svelte:fragment slot="title">File security is enabled</svelte:fragment>
<svelte:fragment slot="title">File level permissions are enabled</svelte:fragment>
<p class="text">
Users will be able to access this file if they have been granted <b
>either File or Bucket permissions.
Users will be able to access this file if they have been granted
<b>either file or bucket level permissions.</b>
</b>
</p>
</Alert>
@@ -134,10 +134,11 @@
<Permissions bind:permissions={filePermissions} />
{:else}
<Alert type="info">
<svelte:fragment slot="title">File security is disabled</svelte:fragment>
<svelte:fragment slot="title">File level permissions are disabled</svelte:fragment>
<p class="text">
If you want to assign document permissions. Go to Bucket settings and
enable file security. Otherwise, only Bucket permissions will be used.
If you want to assign different permissions to individual files. Go to
you bucket's settings and enable file level permissions. Otherwise,
all files in the bucket share the same bucket level permissions.
</p>
</Alert>
{/if}
@@ -299,22 +299,23 @@
<Form onSubmit={updateFileSecurity}>
<CardGrid>
<Heading tag="h6" size="7" id="file-security">File security</Heading>
<Heading tag="h6" size="7" id="file-security">File level permissions</Heading>
<svelte:fragment slot="aside">
<FormList>
<InputSwitch
bind:value={bucketFileSecurity}
id="security"
label="File security" />
label="File level permissions" />
</FormList>
<p class="text">
When file security is enabled, users will be able to access files for which
they have been granted <b>either File or Bucket permissions</b>.
When file level permissions are enabled, users will be able to access files for which they
have been granted <b>either file or bucket level permissions</b>.
</p>
<p class="text">
If file security is disabled, users can access files <b
>only if they have Bucket permissions</b
>. File permissions will be ignored..
When file level permissions are disabled, users can only access
files <b>if they have been granted file level
permissions</b>. You will not be able to assign different permissions
to individual files.
</p>
</svelte:fragment>
<svelte:fragment slot="actions">