Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
titleScript Locations

Userscripts for Confluence allows to download JavaScript files either from a Confluence location or from a remote location.

The location of the JavaScript file is defined by the property named 

Static Document Link
documentScript
labelscript
.

Section
titleConfluence Location

The JavaScript files are typically added as Attachments to pages. Userscripts for Confluence checks that the file has the proper filename extension ".js" and that the file size is not larger than 1 mega byte.

To ensure that the JavaScript file is not manipulated by unprivileged users, the app only provides only files that are accessible by 

Static Document Link
documentConfluence Administrator
labelconfluence administrators
 or 
Static Document Link
documentUserscripts Administrator
labeluserscripts administrators
.

Therefore the page is required to allow only members of these groups to access files in write mode. If no restrictions are set on page level, the app requires that the space is only accessible by members of these two groups.

Caution Box

It is recommended to add JavaScript files only to dedicated spaces where only the mentioned groups have access to.

As space admin go to the Permissions tab of Space Tools.

Screenshot shows a possible permission configuration for administrators and users.Image Modified

Also make sure that all Individual Users listed on this page are members of either 

Static Document Link
documentConfluence Administrator
labelconfluence administrators
 or 
Static Document Link
documentUserscripts Administrator
labeluserscripts administrators
.

Disallow Anonymous Access.

Alternatively you may also configure the proper access restrictions at page level.

Note that the user services need to serve JavaScript files to users independent of their access privileges. Especially anonymous users may need to execute JavaScript code without access privileges to the attached JavaScript files.


Section
titleRemote Locations

If a script URL points to a remote location, then this URL is required to be listed in the Confluence whitelist. The filename is required to show the extension ".js" .

No further restrictions apply.


...