Jump to:

22975 Posts in 11620 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » Password protection to a folder

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 819 Views
  • Carrie_Lang
    Avatar
    Community Member
    24 Posts

    Password protection to a folder Link to this post

    If I make a page that is shown only those who are logged in, and I put files in those pages (that are in the subfolder of the assets folder), how do I make the content of the subfolder also shown only those who are logged in? Because now if I got it right, anyone can access those files if the right address is given (xxx/assets/subfolder/file.pdf)

    And is it possible to create a member profile with only username and password. Now it requires email and password. I tested adding just a username to email field for one member and got logged in with that, but when I tried it in different browser it says either the email address or password isn't valid (so I guessed it requires the content in email field to be email address)

  • Carrie_Lang
    Avatar
    Community Member
    24 Posts

    Re: Password protection to a folder Link to this post

    Help, are these doneable at all? Maybe I can't search with the right words, 'cause can't find anything about this topic..

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Password protection to a folder Link to this post

    Hi, I'd look into .htaccess to do this or maybe the module http://silverstripe.org/secure-files/ might help

  • Carrie_Lang
    Avatar
    Community Member
    24 Posts

    Re: Password protection to a folder Link to this post

    Thanks, I wasn't familiar with that module. It would help a lot if my English was better.. I would have found the answer quite quickly with the search "secure files" but I only got the words like protection to my head, not securing...

    And I'm trying to get the right words to search the answer for making a member area where it is possible to login with the username and password, not with the email address and password.

  • Carrie_Lang
    Avatar
    Community Member
    24 Posts

    Re: Password protection to a folder Link to this post

    Is that username/password login method something what has been in SS before, but in later releases changed into email/password method? I found some old topics about member login with the usernames mentioned but there's no username field in the cms.

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts

    Re: Password protection to a folder Link to this post

    I believe email is used as username and possibly the label was changed from username to email. There is nothing to stop you using your own label (i.e. username) and people not placing in a real email. The benifit of using email is that it is unique (something the username needs to be) and when the user forgets their password - they can use the email to get sent a password a reminder.

  • Carrie_Lang
    Avatar
    Community Member
    24 Posts

    Re: Password protection to a folder Link to this post

    Ok, that helped me a lot! I needed a page to the site that can be accessed with only one shared username+password, which can be changed in the cms, so it's not a problem if someone forgets the password. I tried to use the First name field as the username, but of course it needed to be the email field to put the username.

    819 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.