Skip to main content

Removing Access to Downloads

Zuora

Removing Access to Downloads

At times you may wish to stop certain users being able to access downloadable resources from your site. For example, you may allow paying subscribers to download reports, but not free accounts.

You can manage this within Zephr using a two-phased approach – a feature rule to remove/disable the Download buttons on the front end, and a request rule to navigate users away from the resource.

Hiding the Download Button

First, navigate to Entitlement Manager > Entitlements and create an entitlement called ‘Download’.

Add the entitlement to any relevant bundles to determine which users will be able to download content. For example, if this feature is for Subscribers only, then add it to the bundle users received when they pay for their subscription.

Navigate to UI > UI Components and click Add UI Component. Create a UI component to be shown instead of the download button when users do not have access to downloadable content. Within this UI component, add a link to the relevant paywall you would like users to see instead of the download button – this could be a paywall, or may just be a block to hide the button.

Once saved, navigate to Rules > Feature Rules and click New Feature.

Within the rule, add an Entitlement check for your Download Entitlement. If yes, choose No Transformation. If no, choose UI Component, and select your download-disabled UI component. The rule should look similar to this:

Copy the Zephr Feature Tags from the ‘Site Integration Tip’ and wrap these around the relevant download buttons within your CMS.

Save and Publish your rule.

Redirecting from Resources

After hiding the download button, you may also wish to remove access to the sections of your site where downloadable content is hosted. For this, you will use request rules.

Navigate to Rules > Request Rules, then click New Request Rule.

Name your rule, then, under Conditions, check ‘URL Path Matches’ checkbox.

Enter the URL path for Downloadable content – ideally, this would be a pattern, e.g. ‘/downloads/*’ or this could be for a specific path.

Within your rule, add an Entitlement check for your Download Entitlement. If yes, choose Allow (under Responses). If no, set what you would like the desired outcome to be – for example, you may wish to use a Simple Redirect to send users to a page that displays a paywall.

Redirecting From Resources

Save and publish your rule.

Once these rules are live, users who are not entitled to download content will not be able to see the download content button on your site, and will instead see the message or paywall you have put in place for users without the Download entitlement. If a user attempts to go directly to the link the downloadable content is hosted on, they will be redirected away, and unable to view the content.