MCPcopy Create free account
hub / github.com/apitable/apitable / loadFieldPermissionMap

Method loadFieldPermissionMap

packages/core/src/sync/room.ts:339–348  ·  view source on GitHub ↗

* Switching resources or reconnecting after disconnection requires the column permissions of all data tables in the room

()

Source from the content-addressed store, hash-verified

337 * Switching resources or reconnecting after disconnection requires the column permissions of all data tables in the room
338 */
339 loadFieldPermissionMap() {
340 const dstIds: string[] = [];
341 this.collaEngineMap.forEach((collaEngine) => {
342 if (collaEngine.resourceType !== ResourceType.Datasheet) {
343 return;
344 }
345 dstIds.push(collaEngine.resourceId);
346 });
347 dstIds.length && this.store.dispatch(fetchFieldPermission(dstIds) as any);
348 }
349
350 @errorCapture<RoomService>()
351 async checkVersion(resourceRevisions: IResourceRevision[] | null) {

Callers 3

watchMethod · 0.95
fullFillStoreMethod · 0.80
createDatasheetStoreMethod · 0.80

Calls 4

fetchFieldPermissionFunction · 0.90
forEachMethod · 0.45
pushMethod · 0.45
dispatchMethod · 0.45

Tested by

no test coverage detected