allowModify(path, [user]) Last updated: 30. May 2026

API only function

Checks if the current user has access to modify specified file or folder in Docly. Only applicable for sites with authentication enabled.

See also: Path traversal

Parameters

Name Type Description
path string

Absolute path to file or folder.

user (optional) string

Username (email) of the user to check access for. Defaults to the current user.

Returns

True if current user has access, False if no access / item not found.

Example

Code example (JS)

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