Skip to content

gi-nx


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

ParameterTypeDescription
layerNameOrIdstringThe layer name or layer ID

Returns

Promise<"admin" | "edit" | "view">