Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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

Password protection to a folder


Reply


7 Posts   935 Views

Avatar
Carrie_Lang

Community Member, 24 Posts

5 April 2011 at 7:05am

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)

Avatar
Carrie_Lang

Community Member, 24 Posts

8 June 2011 at 4:01am

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

Avatar
swaiba

Forum Moderator, 1805 Posts

8 June 2011 at 4:20am

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

Avatar
Carrie_Lang

Community Member, 24 Posts

8 June 2011 at 6:44pm

Edited: 08/06/2011 6:55pm

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.

Avatar
Carrie_Lang

Community Member, 24 Posts

9 June 2011 at 7:16pm

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.

Avatar
swaiba

Forum Moderator, 1805 Posts

9 June 2011 at 8:32pm

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.

Avatar
Carrie_Lang

Community Member, 24 Posts

9 June 2011 at 10:42pm

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.