Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Versioned Files - old versions are web accessible

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 421 Views
  • Mike Waters
    Avatar
    Community Member
    6 Posts

    Versioned Files - old versions are web accessible Link to this post

    Hi All

    I'm new to Silverstripe and have a question about the Versioned Files module.

    Old versions of files are stored under the assets directory, eg

    if a file is here...

    .../assets/documents/File.pdf


    its versions are here....

    .../assets/documents/_versions/123/File.1.pdf

    I noticed that these file versions are accessible to unauthenticated site visitors.

    Is there any way of hiding these from site visitors, but keeping them visible for users logged into the admin interface?

    I have searched the web and forums for this with no luck so far

    thanks in advance!

    -Mike

  • Juanitou
    Avatar
    Community Member
    323 Posts

    Re: Versioned Files - old versions are web accessible Link to this post

    Hi Mike.

    I’ve used the secure files module for this kind of issue.

    Hope it helps,
    Juan

  • Mike Waters
    Avatar
    Community Member
    6 Posts

    Re: Versioned Files - old versions are web accessible Link to this post

    Thanks for that Juanitou

    I gave Secure Files module a whirl and it doesn't seem to play nice with Versioned Files (or vice versa of course)

    The secure files module adds access controls to Folders that are visible in the Files and Images section tree.
    Unfortunately the files I need to secure are in subfolders named _versions but these are not visible in the tree so I can't apply access controls directly.

    Also if I make a visible Folder secure via the Secure Files module, any version files (eg asssets/documents/_versions/123/File.1.pdf) give me 403 both in the browser and CMS.

    If anyone has any suggestions about where to go from here it would be good... even if it means getting into the code.

    Another option I considered was to make some manual updates to .htaccess, if anyone can point me in the direction of the "SilverStripe Way" for that kind of thing

    thanks again

    -Mike

    421 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.