This tutorial explains how to enable and disable shared links using the Code42 environment's command-line interface (CLI). Although users can manage their shared links using the SharePlan app or SharePlan web app, administrators may need to disable a shared link to a folder or file in certain situations. For example, a user may accidentally share a folder with confidential information, and request the administrator's help to disable the link. This article explains how to both disable and enable shared links.
- Only users with the following roles in the Code42 environment are able to enable or disable shared links from the CLI:
- Server Administrator
- Links can be enabled or disabled through any of these methods:
- From the administration console CLI by a system or server administrator
- From the SharePlan web app by a Plan Admin of the plan that contains the link
- From the SharePlan web app by the member who originally created the link
- There is no functional difference between an administrator enabling or disabling a link from the administration console and an end user enabling or disabling a link from the SharePlan web app. This means that end users can re-enable links disabled by administrators.
- In a multi-server environment, disabling shared links may be delayed if one or more servers are unavailable.
Before you begin
- The shared link token is simply the last part of a shared link URL. The following example shows both the URL and token of an example shared link:
- You must know the shared link's URL or token in order to disable or enable the link via the CLI.
Enabling or disabling a shared link
Step 1: Open the cli
- Sign in to the administration console on your master server in a web browser as a user with the necessary permissions.
- Double-click the logo in the upper left corner of the administration console.
The command-line interface appears in the administration console.
Step 2: Enable or disable the link
To disable a shared link, enter the CLI command
sharedlink.disable followed by the URL or token. For example:
To enable a previously disabled shared link, enter the CLI command
sharedlink.enable followed by the URL or token. For example:
The CLI responds with the message, "Your command has been submitted for execution." To confirm that the shared link is disabled or enabled, simply visit the shared link URL in a web browser.