The context object returned by view.getContext() does not match the current documentation or TypeScript types. We see additional properties that are not documented.
In my particular case, I am looking at the permissions property and wonder if:
- Is it fine to rely on undocumented Custom UI context properties?
- Is it safe to build code that relies on the permission data provided?
- Is this property always available with the structure and properties shown below (scopes, external, etc.)?
- Why does the
read:app-system-tokenscope appear twice? Appears to be a bug.
Below is an extract of the context object, including the permission object that I get in my Custom UI.
{
...
"permissions": {
"scopes": [
"read:app-system-token",
"read:app-system-token",
"read:connect-jira",
"read:jira-user",
"read:jira-work",
"storage:app",
"write:jira-work"
],
"external": {
"fetch": {
"backend": [
"https://example.com"
],
"client": [
"https://example.com"
]
},
"fonts": [],
"styles": [],
"frames": [],
"images": [
"*.example.com"
],
"media": [],
"scripts": [
"https://example.com"
]
}
}
}