-
-
Notifications
You must be signed in to change notification settings - Fork 359
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3838 from mathesar-foundation/permissions-modals-2
Implement basic Table data model on the frontend and Table Permissions modal -> 'Share' tab
- Loading branch information
Showing
66 changed files
with
525 additions
and
373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
mathesar_ui/src/components/SelectTableWithinCurrentSchema.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
mathesar_ui/src/components/breadcrumb/BreadcrumbRecordSelector.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { api } from '@mathesar/api/rpc'; | ||
import type { | ||
RawTableWithMetadata, | ||
TablePrivilege, | ||
} from '@mathesar/api/rpc/tables'; | ||
import AsyncRpcApiStore from '@mathesar/stores/AsyncRpcApiStore'; | ||
import { ImmutableMap } from '@mathesar-component-library'; | ||
|
||
import type { Role } from './Role'; | ||
import type { Schema } from './Schema'; | ||
|
||
export class Table { | ||
oid: number; | ||
|
||
name: string; | ||
|
||
description: string | null; | ||
|
||
metadata; | ||
|
||
schema; | ||
|
||
owner_oid: Role['oid']; | ||
|
||
current_role_priv: TablePrivilege[]; | ||
|
||
current_role_owns: boolean; | ||
|
||
constructor(props: { | ||
schema: Schema; | ||
rawTableWithMetadata: RawTableWithMetadata; | ||
}) { | ||
this.oid = props.rawTableWithMetadata.oid; | ||
this.name = props.rawTableWithMetadata.name; | ||
this.description = props.rawTableWithMetadata.description; | ||
this.metadata = props.rawTableWithMetadata.metadata; | ||
this.owner_oid = props.rawTableWithMetadata.owner_oid; | ||
this.current_role_priv = props.rawTableWithMetadata.current_role_priv; | ||
this.current_role_owns = props.rawTableWithMetadata.current_role_owns; | ||
this.schema = props.schema; | ||
} | ||
|
||
constructTablePrivilegesStore() { | ||
return new AsyncRpcApiStore(api.tables.privileges.list_direct, { | ||
postProcess: (rawTablePrivilegesForRoles) => | ||
new ImmutableMap( | ||
rawTablePrivilegesForRoles.map((rawTablePrivilegesForRole) => [ | ||
rawTablePrivilegesForRole.role_oid, | ||
rawTablePrivilegesForRole, | ||
]), | ||
), | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.