Folder security is used to set defaults for any file or page that shares a relative path. The definitions are read from the WebServer table as the rest of the definitions. The requirements are Type="Settings" and Url must have a value. The Code field can then be either a JSON definition or a DQL.

JSON security definition

The definition must be a object with the following settings:

recursive is this folder definition recursive
readlevel the level needed for reading in this folder
updatelevel the level needed for updating in this folder
createlevel the level needed for creating in this folder
deletelevel the level needed for deleting in this folder
devserver settings that will override for the development server
server settings that will override for the live server
{
  "recursive" : true,
  "readlevel" : "Medium2",
  "updatelevel" : "High",
  "createlevel" : "Medium2",
  "deletelevel" : "High"
}<br>

Simple example

Advanced example that set different rules for development and live server

DQL security definition

You must start the code wit .dql for the setting to recognize this as a dql. The dql will use Remote for communication with the server. A remote session named "Security" is created and clear before the dql is started. The value "what" is set to tell the type of security we are after and "url" with the path to the element in question. You then return "result" with "yes" or "no" to tell if the request is granted or not.

.dql

Example of a dql that tests user and level and grant the the rights to folders based on that.