@folderharbor/sdk
    Preparing search index...

    Methods for reading, listing, and updating Access Control Lists (ACLs).

    Constructors

    Methods

    • Creates an ACL.

      Parameters

      • body: FHCreateACL

        The name, and optionally allow and deny paths, for the new ACL

      Returns Promise<{ id: number }>

      The new ACL's ID

      acls:create

      If your session is invalid, expired, or for a locked account

      If you don't have permission to take this admin action

      If anything else went wrong, either in the process of requesting, or in the response from the server

      const { id } = await client.admin.acls.create({ name: "media", allow: ["/srv/tv/**", "/srv/music/**"], deny: ["/srv/music/explicit/**"] });
      
    • Deletes an ACL.

      Parameters

      • aclID: number

        The ACL's ID

      Returns Promise<void>

      acls:delete

      If your session is invalid, expired, or for a locked account

      If you don't have permission to take this admin action

      If anything else went wrong, either in the process of requesting, or in the response from the server

      await client.admin.acls.delete(2);
      
    • Edits an ACL's information.

      Note that editing allow/deny paths here overwrites them on the ACL! If you don't know the existing state of these to properly merge your changes, I suggest using editPaths instead.

      Parameters

      • aclID: number

        The ACL's ID

      • body: FHEditACL

        The parts of the ACL to alter

      Returns Promise<void>

      acls:edit

      If your session is invalid, expired, or for a locked account

      If you don't have permission to take this admin action

      If anything else went wrong, either in the process of requesting, or in the response from the server

      await client.admin.acls.edit(2, { name: "test", allow: ["/home/test/**"], deny: ["/home/test/private/**", "/home/test/.aws/**"] });
      
    • Edits an ACL's allow and deny paths.

      This method does not overwrite these paths on the ACL, it will merge them into the existing ones. If you know the existing state of these, I suggest using edit instead.

      Parameters

      • aclID: number

        The ACL's ID

      • body: FHEditACLPaths

        The parts of the ACL to alter

      Returns Promise<void>

      acls:edit

      If your session is invalid, expired, or for a locked account

      If you don't have permission to take this admin action

      If anything else went wrong, either in the process of requesting, or in the response from the server

      const paths: FHEditACLPaths = [
      { path: "/home/admin/**", type: "allow", delete: true },
      { path: "/home/admin/Documents/**", type: "allow", delete: false },
      { path: "/home/admin/Documents/report.pdf", type: "deny", delete: false }
      ];
      await client.admin.acls.editPaths(2, paths);
    • Gets an ACL's info from its ID.

      Parameters

      • aclID: number

        The ACL's ID

      Returns Promise<FHACL>

      The ACL's information/details

      acls:read

      If your session is invalid, expired, or for a locked account

      If you don't have permission to take this admin action

      If anything else went wrong, either in the process of requesting, or in the response from the server

      const acl = await client.admin.acls.get(1);
      
    • Gets the list of ACLs and their IDs.

      Returns Promise<FHACLList>

      A list of ACLs with their corresponding IDs

      acls:list

      If your session is invalid, expired, or for a locked account

      If you don't have permission to take this admin action

      If anything else went wrong, either in the process of requesting, or in the response from the

      const acls = await client.admin.acls.list();