latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

URI restrict. & download restrict. in concert

Home Forums Community Forum URI restrict. & download restrict. in concert

This topic contains 3 replies, has 2 voices. Last updated by  Bruce 3 years, 9 months ago.

Topic Author Topic
Posted: Wednesday Apr 10th, 2013 at 8:29 pm #47140
Steve G.
Username: intelengua

your security-enabled download link capability (using the
?s2member_file_download=file.xxx format) is awesome, and it works like a charm!

here’s my question: should a URI level-based restriction prevent a download link from working for a certain level? i’ve searched for an answer to this to no avail, and have tried it, but it doesn’t seem to work.

i would like to restrict level 0 (a “subscriber” vs. “member”?) from downloading files, so i added the URI fragment “download” to URI’s that require level #1 or higher.

however, logged in as a subscriber (level 0), i was still able to click on the download link and see the file (it actually isn’t a download, but is served inline according to the default inline file extensions i set up).

i was logged in using a different browser with cache cleared, too…

thx in advance!

Steve

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Thursday Apr 11th, 2013 at 1:49 am #47160
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

i would like to restrict level 0 (a “subscriber” vs. “member”?) from downloading files, so i added the URI fragment “download” to URI’s that require level #1 or higher.

The better way to do this would be to only allow links to be accessed with the keys shown in Advanced Download Options, and use s2Member’s Shortcode Conditionals do decide when to show these special links. That way Users can only see the special links when they are a certain level, and therefore only access content when they can see the links.

See: Dashboard -› s2Member® -› Download Options -› Advanced Download Restrictions
See Also: Knowledge Base » Simple Shortcode Conditionals

Posted: Thursday Apr 11th, 2013 at 7:45 am #47174
Steve G.
Username: intelengua

Cool, thanks… I am looking forward to using your key function! But…

here’s my problem: for this particular content I want to show those links from another location, too, outside of the wordpress environment in several parts of a multi-page html5 e-learning experience. i want the transition from one page to the next to be seamless, and it would be a frustrating user experience to have to download a key each time they click “next”.

so, I would think the uri restriction should function with the download restriction, but as I said, it doesn’t appear to be working. your thoughts on that technique? even if might be round-about from your standpoint, it would actually be an elegant solution from mine…

thanks again, Bruce!

— Steve

P.S. either way, I already purchased pro. mass import! whoo-hoo!

Posted: Friday Apr 12th, 2013 at 6:09 pm #47334
Bruce
Username: Bruce
Staff Member

here’s my problem: for this particular content I want to show those links from another location, too, outside of the wordpress environment in several parts of a multi-page html5 e-learning experience. i want the transition from one page to the next to be seamless, and it would be a frustrating user experience to have to download a key each time they click “next”.

I think this’ll take a workaround with some custom PHP code. You’d want to have your developer set up a check to see if a User matches a certain User level, and you can redirect using the PHP key from Advanced Download Options to allow it to work. We’re hoping to allow for this functionality in the future but for now that’s what you’ll need to do.

See: Dashboard -› s2Member® -› API / Scripting -› Advanced PHP Conditionals

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.