Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-07-06 18:17:52
- brandine
- New Member
- Registered: 2010-06-25
- Posts: 8
"Enhanced role-based permissions" for files in 4.2
Can anybody tell me how the new “enhanced role-based permissions” for files works?
In the same way that I can protect articles on my site with the plug-in ign_password_protect, I would like to establish password protection for files on my site (these are journal articles protected by copyright). Recently, a user was able to find a link to her copyrighted article on our site via Google search, even though I had no links to the article on my site. I want to keep this article and other articles like it “Live”, but I don’t want anybody without a password to be able to download them… and I cannot for the life of me figure out how to lock-down the textpattern links of the form: http://mysite.com//index.php?s=file_download&id=409
I was hoping (dreaming?) that the “enhanced role-based permissions” in 4.2 would help me, but I can’t find any documentation for them… help would be very much appreciated!
brandine
Offline
Re: "Enhanced role-based permissions" for files in 4.2
The new permissions stuff is for the admin side, so won’t help you protect against unauthorized downloads on the public side.
I’m not a ign_password_protect user; I see there’s some download-related code in there, but don’t know its status.
Code is topiary
Offline
#3 2010-07-07 16:10:59
- brandine
- New Member
- Registered: 2010-06-25
- Posts: 8
Re: "Enhanced role-based permissions" for files in 4.2
Well, could someone at least let me know what these new admin-side enhancements are supposed to be? Textpattern is so lacking in documentation…
Offline
Re: "Enhanced role-based permissions" for files in 4.2
Txp’s official documentation is TextBook. On the TextBook home page, pride of place goes to Distribution and History. Second of the two links thereunder is Textpattern Release History. Near the top of the Version 4.2.0 Changelog is the item:
- Feature: Role-based permission checks for images, links and files
which, I’ll admit, is pretty terse, but gives the idea. A fuller description can be found in the textpattern.com weblog post Focus on 4.2.0, again quite easy to find.
Code is topiary
Offline
#5 2010-07-07 21:05:42
- jpdupont
- Member
- Registered: 2004-10-01
- Posts: 752
Re: "Enhanced role-based permissions" for files in 4.2
Same problem and this solution :
- Use this script for files download : http://www.gentlesource.com/file-download/
- Use Textpattern to upload the files in the script download directory
- Remove the “published” status of each file to disallow the txp download.
- some article is protected by ign_password_protect
- In this article I put a download link like this : http://www.mysite.info/dm/index.php?nom_de_mon_fichier.pdf (dm is the directory where I put the script above.
- Some .htaccess settings (see the files of the script) disallow directory listing, and direct file download
Bad : txp counter don’t work
But : the script has log /count files (allow writing in chmod)
Offline