gi-nx / getLayerPermission
ts
function getLayerPermission(layerNameOrId: string): Promise<"admin" | "edit" | "view">;Get the current user's permission for a layer (layer must be added to the current project). NB Does not work for temp layers or portfolio layers as they share a project's permission.
Parameters
| Parameter | Type | Description |
|---|---|---|
layerNameOrId | string | The layer name or layer ID |
Returns
Promise<"admin" | "edit" | "view">