Docly Developers
Function API only Updated 23 Oct 2026

allowModify(path, [username])

Checks whether the logged-in visitor, or a given user, may modify the specified file or folder in Docly. Only meaningful on sites with login.

Parameters

pathstringrequired

Path to the file or folder, from the site root. The path is looked up as a folder first, then as a file.

usernamestringoptional

Login (email) of the user to check. Defaults to the logged-in visitor.

Returns

true or false. false when no username is given and nobody is logged in, when the user is unknown, or when the path matches neither a folder nor a file.

Example

Normal JavaScript, running in the browser or on the Docly™ server.
if (docly.allowModify("test file"))
{
   return "Access allowed";
}