Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 25 additions & 51 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const {
DOC_NAV_PAGE_ID,
NOT_FOUND_PAGE_ID,
} = require('./src/configs/doc-configs');
const { getDocLinkFromEdge } = require('./src/utils/gatsby-utils.js');

exports.onPostBuild = () => {
fsExtra.copyFileSync(
Expand Down Expand Up @@ -30,7 +31,6 @@ exports.createPages = async function ({ actions, graphql }) {
relativePath
}
}

}
}
}
Expand All @@ -39,66 +39,40 @@ exports.createPages = async function ({ actions, graphql }) {

const namePageIdMap = {};
data.allAsciidoc.edges.forEach((e) => {
const { sourceInstanceName: sourceName, relativePath : relPath } = e.node.parent;
const {
sourceInstanceName: sourceName,
relativePath: relPath,
} = e.node.parent;
const pageId = e.node.pageAttributes.pageid;
if (sourceName === 'tutorials'){
const relPathSplit = relPath.split('/');
const pageIdSplit = pageId.split('__');
let finalPageId = pageId;
if( pageIdSplit.length > 1) {
if (sourceName === 'tutorials') {
const relPathSplit = relPath.split('/');
const pageIdSplit = pageId.split('__');
let finalPageId = pageId;
if (pageIdSplit.length > 1) {
finalPageId = pageIdSplit[1];
}
let mapPageId = `tutorials/` + finalPageId;
if(relPathSplit.length > 1) {
mapPageId = `tutorials/${relPathSplit[0]}/` + finalPageId;
}
namePageIdMap[e.node.parent.name] =
mapPageId || NOT_FOUND_PAGE_ID;
}

else {
}
let mapPageId = `tutorials/${finalPageId}`;
if (relPathSplit.length > 1) {
mapPageId = `tutorials/${relPathSplit[0]}/${finalPageId}`;
}
namePageIdMap[e.node.parent.name] = mapPageId || NOT_FOUND_PAGE_ID;
} else {
namePageIdMap[e.node.parent.name] =
e.node.pageAttributes.pageid || NOT_FOUND_PAGE_ID;
}
});

data.allAsciidoc.edges.forEach((edge) => {
const { pageid: pageId } = edge.node.pageAttributes;
const { sourceInstanceName: sourceName, relativePath : relPath } = edge.node.parent;

// Tutorials module pageids follow pattern {subdirectory}_{final_url_stub} to give unique IDs in system but allow directory structure in URL
if (sourceName === 'tutorials'){
// One-level of subdirectory part of stub
const relPathSplit = relPath.split('/');
const pageIdSplit = pageId.split('__');
let finalPageId = pageId;
if( pageIdSplit.length > 1) {
finalPageId = pageIdSplit[1];
}

let finalPath = `/tutorials/${finalPageId}`;
if(relPathSplit.length > 1) {
finalPath = `/tutorials/${relPathSplit[0]}/${finalPageId}`;
}

actions.createPage({
path: finalPath,
component: require.resolve(
'./src/components/DevDocTemplate/index.tsx',
),
context: { pageId, navId: DOC_NAV_PAGE_ID, namePageIdMap },
});
}

else {
actions.createPage({
path: `/${pageId}`,
component: require.resolve(
'./src/components/DevDocTemplate/index.tsx',
),
context: { pageId, navId: DOC_NAV_PAGE_ID, namePageIdMap },
});
}
const docPath = getDocLinkFromEdge(edge);
actions.createPage({
path: docPath,
component: require.resolve(
'./src/components/DevDocTemplate/index.tsx',
),
context: { pageId, navId: DOC_NAV_PAGE_ID, namePageIdMap },
});

if (pageId === 'introduction') {
actions.createPage({
Expand Down
12 changes: 8 additions & 4 deletions modules/ROOT/pages/abac-user-parameters.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ An example of setting both `filter_rules` and `parameter_values` without any per
----

=== Apply to specific objects
By default, any specified filter or parameter will bind to *any content* with an exact match for the column or Parameter name.
By default, any specified filter or parameter will bind to any content with an exact match for the column or Parameter name.

You can choose the filter or Parameter to apply only to specific ThoughtSpot objects by including an `objects` array in the following format:

Expand All @@ -104,13 +104,17 @@ You can choose the filter or Parameter to apply only to specific ThoughtSpot obj
"identifier": "{id or name of the object}"
},
{
"type":"LIVEBOARD",
"identifier": "9bd202f5-d431-44bf-9a07-b4f7be372125"

"type": "LOGICAL_TABLE",
"identifier": "9b751df2-d344-4850-9756-18535797378c"
}
]
----

[NOTE]
====
The only supported object types for data security are logical tables.
====s

[#persistForUser]
=== Token-based override versus persisting values
When using a `persist_option` other than `NONE`, the *filter_rules* and *parameter_values* defined in the token request using the `auth/token/custom` API endpoint are stored in the `user` > `access_control_properties` object.
Expand Down
Loading
Loading