Page 1 of 1

Password protect whole website

Posted: Fri Jan 12, 2007 11:49 am
by bmeuwis
How would I go about if I wanted to have the whole CMSMS-site password protected (not only for editing, but also for viewing)? I know this involves the FrontEndUsers-module, but I can't seem to figure out where to place the right tag  in order to have the system ask me for a username and password if I want to enter the site.
Txs ! Bart.

Re: Password protect whole website

Posted: Fri Jan 12, 2007 12:09 pm
by cyberman
It's simple. You need FrontendUsers module and CustomContent module.

Take your current template, add module call for frontend Users and CustomContent to the first. The rest of content (menu, content, other modules) must be place inside special commands. Help of CustomContent module is very useful for that.

Re: Password protect whole website

Posted: Sat Jan 13, 2007 7:53 am
by bmeuwis
Txs, Cyberman, that already brought me halfway. Now I get a login-screen before I can enter the site. It's not neat though, as you can see in the attachment. I get all the login-data at the to of the page. How can I get them in a neat way in the left menu ?
Bart.


[gelöscht durch Administrator]

Re: Password protect whole website

Posted: Sat Jan 13, 2007 8:07 am
by mahjong
You absolutely don't want to use FrontEndUser for this.

Create a global htaccess/htpasswd instead : http://www.sitedeveloper.ws/tutorials/htaccess.htm

Re: Password protect whole website

Posted: Sat Jan 13, 2007 8:18 am
by bmeuwis
mahjong, why would I not use FrontEndUser ? Is it not suited for this purpose or is there something wrong with it ? Looks to me like it's doing it's job, although not displayng very nicely. Advantage over htaccess/htpaswd would be that this can be managed from the admin-panel over the internet, as for access to the htaccess/htpasswd you need access to your server.

Am I overseeing something ?

Re: Password protect whole website

Posted: Sat Jan 13, 2007 8:28 am
by mahjong
It takes 5 or 6 lines to password protect your whole site with htaccess. Everything will be out of reach : pages, scripts, images, and every single bit of data your server contains.

With FrontEndUser/CustomContent you can only hide some of the content : the HTML parts that are generated/assembled with CMSMS. Anyone will be still be able to view the raw content of your server.

Re: Password protect whole website

Posted: Sat Jan 13, 2007 7:48 pm
by jmcgin51
bmeuwis -

you can place the FEU tag anywhere in the page; the login form or "welcome" text will display wherever you place the tag.  I use a separate template for my homepage, which contains only the FEU tag.  All other pages include the FEU tag at the top of the 2nd page column, so that the use always can see that s/he is logged in and can logout if desired

Mahjong - I don't disagree that htaccess is more secure, but it can only restrict access to directories, not content within a page...  how do you work around this??

Re: Password protect whole website

Posted: Sun Jan 14, 2007 5:38 pm
by mahjong
Read carefully the original poster's question. He wants to
have the whole CMSMS-site password protected (not only for editing, but also for viewing)

Re: Password protect whole website

Posted: Sun Jan 14, 2007 11:57 pm
by jmcgin51
Right, I understand what he wants, but why won't a standard installation work for him, if he includes FEU and CC modules?  The Admin panel is protected by default, so that's not a problem, and the frontend can be protected with CC, so that fulfills his need.  If he uses htaccess, then administrators have to log in 2x, once for htaccess just to get access to the CMSMS directory, and again to log into the Admin panel.  Why is the 2nd level of security necessary, especially since CC will be needed anyway if he wants to restrict content to certain users/groups?

thanks!