By onejam on
Does anyone know how i can password protect the all website (like an Intranet)?
I'm creating a wedding website for a friend and they prefer it to be private and only viewable by family and friends.
thank you,
Does anyone know how i can password protect the all website (like an Intranet)?
I'm creating a wedding website for a friend and they prefer it to be private and only viewable by family and friends.
thank you,
Comments
Why not just enable approval
Why not just enable approval for user registrations and only allow authenticated users access to content? Of course you can password protect, but isn't this an easier/ cleaner way to achieve the same end?
Pobster
What they wanted was a login
What they wanted was a login box on the frontpage so only the frontpage is accessible by public and all other pages will be protected. Does that make sense?
thanks,
-----------------------------------------------------------------
We build engaging websites and intuitive designs that will benefit your business.
Duvien
Yeah that's the effect you'd
Yeah that's the effect you'd have, although you might have to use "Views" or "Splash" to show a generic entry/ frontpage - I'm not entirely sure about that. But yep, they'd see a login box and when they're logged in they'd be able to access all the content. If they're not logged in, Drupal would issue an access denied message for any page anyone tries to look at bar the frontpage.
edit: Thinking about it, I think there's a option in admin/settings/site-information for 'Default Front Page', if you assign this to a specific node of a node type you've used nowhere else (say a story node and everything else is page node or whatever) you could then allow unauthenticated users to view this nodetype but nothing else, that'd limit them to the front page only. ...Maybe Views would be neater ;o) It's just more complicated!
Pobster
This is exactly what pobster
This is exactly what pobster says.
You have to:
If you want to use pictures you should use the Private download method in "File System" and use a directory not accessible for the web.
If you want a better looking front page you can use the Front Page module (http://drupal.org/project/front).
9ls
Oops, yeah sorry I meant
Oops, yeah sorry I meant "front page" module, not "splash" - that was just from memory ;o) Don't even know if it exists!
Pobster
The above suggestion will allow you to do exactly that.
Just configure so that the anonymous user has no permissions to see anything other than the homepage.
Thanks to all your replies.
Thanks to all your replies. Authenticed users for some reason where still not able to view the frontpage after logging in.
So i went ahead and used node_privacy_byrole module and this seems to have done the trick. It's a lot of hassle because for each page i had to set the permissions, however, it's a very small site consisting of 4 - 5 pages so not a problem.
I've also setup role for web editor as the lovely soon to be married couples will need to update their own contents.
I'm not using frontpage module as i thought it would be quicker to override the template, using something like page-front.tpl.php
My final biggest problem is that all authenticated users should only have access to contents only and nothing else. How can i hide the navigation menu from all authenticated users and only present this to web editors and admin?
thanks,
@9ls -
i know how to set it to private downloads but how do you specify a directory not accessible to the web and still link images to the webpage?
-----------------------------------------------------------------
We build engaging websites and intuitive designs that will benefit your business.
Duvien
Sorry, i just had to set the
Sorry, i just had to set the navigation menu in block to only show for web editors. But the problem now is that it isn't showing up for admin user.
thanks,
-----------------------------------------------------------------
We build engaging websites and intuitive designs that will benefit your business.
Duvien
Generally you can specify
Generally you can specify anything below htdocs (eg. /var/www/localhost/files) it depends on your hosting. You'd link to pictures by linking through Drupals file serving mechanism eg. system/files/images/crystal_castles.jpg (the system/files bit is the 'magic').
If by 'admin' user you mean your superuser user -1 then well, it should be displaying it? Superuser doesn't require any permissions as it gains *all* permissions by being superuser.
Pobster
I'm using Drupal 6 and the
I'm using Drupal 6 and the file path has changed. Everything is stored in /sites/default/files/
What you are saying is that if i create a folder called files in /home/{username}/ which is below my webroot folder and then set it to private in Drupal.
Drupal should just know where this folder called file is? Do i also have to change the File system path: to /home/{username}/files ???
As for nav menu not showing up, yes, i would have thought that was the case, admin (superuser -1) i was referring to can't see the navigation menu block?
thanks,
EDITED:
Just realised i had to also add web editor role to admin user before it will work. This shouldn't be right as admin is the first user created and should inherited everything from all the roles that are created. Very odd access premission Drupal has?
-----------------------------------------------------------------
We build engaging websites and intuitive designs that will benefit your business.
Duvien
Errr no... The file path
Errr no... The file path hasn't changed, you could always do that before but it's still a 'user set' variable (the file path) it can be anywhere. /tmp if you really felt like it and don't auto clear your tmp folder... So yeah, set it wherever - obviously keeping it within eg. /var/www/drupal/files is a good idea to keep all the files together in a nice neat place. That's entirely why the default for file paths has become /sites/*/files just for neatness. Of course Drupal won't be able to auto-detect this value it's not magic! You'd have to set it yourself and obviously as it's outside the directories set for your Drupal installation only the private method will be able to 'serve' files from it. Note as files are being served and not just displayed from where they are that this will have a huge impact on page loading times.
As for the other thing, that is weird... Maybe it's a bug? I'd even consider making a bug report for it to core? It's definitely not right.
Pobster
Okay, i think i'm getting
Okay, i think i'm getting what your trying to explain about the file path, however, how would someone add an image to content and link to an image that is not in the webroot path?
I don't use any editor (like TinyMCE or FCK) and usually just type it out by hand, find it quicker. However, it would mean when typing:
< img src="{file path???}" alt ="" />
I'm at a lost there?
thanks,
-----------------------------------------------------------------
We build engaging websites and intuitive designs that will benefit your business.
Duvien
I put that above... You use
I put that above... You use system/files (system/{file path} I mean, or ?q=system/files if you're not using clean urls - remember the file is being SERVED you're not linking to it directly, i.e. there's a piece of code which passes the file to you rather than the file being displayed from where it is).
Pobster
Front page module
It is very easy to use the front page module.
You can set up different front pages for every role, or redirect to any spesific node.
You have to fill in the wanted front page for your roles (admin/settings/front) and fill in "front_page" in the "Activate your front_page settings" field. That should be it.
protected_node module
try http://drupal.org/project/protected_node
Try not answering three year
Try not answering three year old threads! ;o)
Pobster
I can never work out why this
I can never work out why this happens so often...?
Pobster
Securesite module
duvien, another option https://drupal.org/project/Securesite
pobster, a 3 years old question might still be valid today. Maybe not valuable to you but might be valuable to others ;) In my case today we have the same question and all above contributions are valuable including the one posted 3 years later. Also the Drupal forum is both a place to answer questions and capture knowledge. Regardless of the time the original question was posted.
There are plenty of people
There are plenty of people *asking* these types of questions right now, and certainly duvien isn't currently trying to solve a problem they had from 2008... Indeed even my reply you're referring to was from 2011 - the question has already been answered above very simply, so again I ask - why not answer new questions or if you wish to 'capture knowledge' write a Drupal document page? We are crying out for them - the vast majority are very out of date.
Pobster
Just click password protect
Just click password protect in your cPanel and then select Public_Html. Add a Username & Password then give them out to the selected people.
That is the quickest & simplest.
Nobody mentioned
Nobody mentioned Cpanel.
Pobster
cPanel
With all due respect Pobster, regardless of whether it was mentioned or not it is a popular hosting tool, and is relevant to the question at hand. I for one am glad it was mentioned because that will be the simplest solution for me. It seems as though each time you put down someones response, someone else finds that response helpful. Just an observation.
Then you completely
Then you completely misunderstand my sentiment...
Drupal *used* to be a great community. When questions were asked, it was simple to be able to point to the handbook and say "there, that's your answer" and when someone found that steps have changed, they added to the handbook - simple. Now in the age of "Drupal-for-profit" where there are so many Drupal help books it's hard to know which to buy, useful posts (yes, like the cpanel one above) are buried deep within forums forcing people to part with money to buy said books. If someone wants that information above but isn't quite googling for it correctly - they're simply not going to find it in this mess. I fail to see how wishing for a better online handbook is negative. Is the poster going to monitor the forums for all similar security-based questions and copy-paste the tip from above? No! Of course not... If it were in the handbook in a *sensible place* were people could find it then it would be invaluable and added to that, the poster would receive a nice contributors notice in their profile which looks great on their CV/ resume.
So again, handbooks are better than random information posted on already answered topics from nearly five years ago. Consider how large the forums are now and how hard it can be to find useful information and then ask yourself whether your "observation" is justified.
Pobster
PS. "With all due respect also..." and I mean that, this isn't a rant - it's a plea. Drupal is currently dying - in the last year I've seen four very large UK companies drop it completely.
Thanks pobster! cPanel
Thanks pobster! cPanel solution was all I needed.
Sustainable Transport in Drupal.
www.ridebubble.org
www.nosfuimos.cl