# Password protection part of a radiant web site

**URL:** <https://www.ruby-forum.com/t/password-protection-part-of-a-radiant-web-site/81660>\
**Category:** Radiant CMS\
**Created:** [January 11, 2007, 1:09am UTC](https://www.ruby-forum.com/t/password-protection-part-of-a-radiant-web-site/81660 "2007-01-11T01:09:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![luigi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/73ab20/32.png) [@luigi](https://www.ruby-forum.com/u/luigi)\
**Post date:** [January 11, 2007, 1:09am UTC](https://www.ruby-forum.com/t/password-protection-part-of-a-radiant-web-site/81660/1 "2007-01-11T01:09:08Z")

</div>

Hello.

Is there any working solution made available by the radiant  
development/user community to password protect a part of a radiant-based  
web site?

Unluckily it seems the password\_protected behavior doesn’t work with  
0.5.2 (see below for the error I get) ☹

Many thanks in advance!

Luigi

ActionController::MissingTemplate (Missing template  
/usr/lib/ruby/gems/1.8/gems/radiant-0.5.2/lib/…/app/views/site/show\_page.rhtml):

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/base.rb:1034:in  
`assert\_existence\_of\_template\_file’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/base.rb:724:in  
`render\_file’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/base.rb:648:in  
`render\_with\_no\_layout’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/layout.rb:245:in  
`render\_without\_benchmark’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/benchmarking.rb:53:in  
`render' /usr/lib/ruby/1.8/benchmark.rb:293:in`measure’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/benchmarking.rb:53:in  
`render’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/base.rb:942:in  
`perform\_action\_without\_filters’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/filters.rb:368:in  
`perform\_action\_without\_benchmark’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/benchmarking.rb:69:in  
`perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in`measure’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/benchmarking.rb:69:in  
`perform\_action\_without\_rescue’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/rescue.rb:82:in  
`perform\_action’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/base.rb:408:in  
`send’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/base.rb:408:in  
`process\_without\_filters’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/filters.rb:377:in  
`process\_without\_session\_management\_support’

/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action\_controller/session\_management.rb:117:in  
`process' /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/dispatcher.rb:38:in`dispatch’  
/opt/lsws/fcgi-bin/RailsRunner.rb:12

---

<div class="post-metadata">

**Author:** ![luigi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/73ab20/32.png) [@luigi](https://www.ruby-forum.com/u/luigi)\
**Post date:** [January 11, 2007, 8:41am UTC](https://www.ruby-forum.com/t/password-protection-part-of-a-radiant-web-site/81660/2 "2007-01-11T08:41:50Z")

</div>

Ruben D. Orduz wrote:

> ho questo archivio “app/views/site/show\_page.rhtml” in questo diretorio?

Ciao Ruben, grazie per l’aiuto! 🙂

the file is effectively missing. My installation of radiant is from the  
gem and not a “full” one (i.e. the app dir is not in my application root  
directory).

What the show\_page file is supposed to contain?

Grazie.

Luigi

---

<div class="post-metadata">

**Author:** ![luigi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/73ab20/32.png) [@luigi](https://www.ruby-forum.com/u/luigi)\
**Post date:** [January 11, 2007, 1:48am UTC](https://www.ruby-forum.com/t/password-protection-part-of-a-radiant-web-site/81660/3 "2007-01-11T01:48:10Z")

</div>

Luigi,

ho questo archivio “app/views/site/show\_page.rhtml” in questo diretorio?

---

<div class="post-metadata">

**Author:** ![luigi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/73ab20/32.png) [@luigi](https://www.ruby-forum.com/u/luigi)\
**Post date:** [January 11, 2007, 11:42am UTC](https://www.ruby-forum.com/t/password-protection-part-of-a-radiant-web-site/81660/4 "2007-01-11T11:42:45Z")

</div>

Luigi R. wrote:

> Ruben D. Orduz wrote:
> 
> > ho questo archivio “app/views/site/show\_page.rhtml” in questo diretorio?  
> > the file is effectively missing. My installation of radiant is from the  
> > gem and not a “full” one (i.e. the app dir is not in my application root  
> > directory).

I created the file “app/views/site/show\_page.rhtml”, and when I access  
the password protected page it is simply rendered to the browser but no  
authentication request is issued. I think it worth noticing I’m using  
litespeed as web server to serve the radiant site.

L

---

<div class="post-metadata">

**Author:** ![luigi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/73ab20/32.png) [@luigi](https://www.ruby-forum.com/u/luigi)\
**Post date:** [January 19, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/password-protection-part-of-a-radiant-web-site/81660/5 "2007-01-19T16:30:49Z")

</div>

What I don’t get is how can he be running Radiant w/o an app folder  
inside RAILS\_ROOT dir? I’m still puzzled about that one. Sensa una  
buona explicazione non puo fare niente.

---

<div class="post-metadata">

**Author:** ![luigi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/73ab20/32.png) [@luigi](https://www.ruby-forum.com/u/luigi)\
**Post date:** [January 11, 2007, 4:21pm UTC](https://www.ruby-forum.com/t/password-protection-part-of-a-radiant-web-site/81660/6 "2007-01-11T16:21:29Z")

</div>

Luigi R. wrote:

> Hello.
> 
> Is there any working solution made available by the radiant  
> development/user community to password protect a part of a radiant-based  
> web site?
> 
> Unluckily it seems the password\_protected behavior doesn’t work with  
> 0.5.2 (see below for the error I get) ☹

Probably the easiest thing to do is to setup basic authentication with  
an apache .htaccess file. Would that work for you?

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![luigi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/73ab20/32.png) [@luigi](https://www.ruby-forum.com/u/luigi)\
**Post date:** [September 25, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/password-protection-part-of-a-radiant-web-site/81660/7 "2007-09-25T22:43:34Z")

</div>

Ruben D. Orduz wrote:

> What I don’t get is how can he be running Radiant w/o an app folder  
> inside RAILS\_ROOT dir? I’m still puzzled about that one. Sensa una  
> buona explicazione non puo fare niente.

Hello Ruben.

I installed radiant from a gem, and not as an application bu as an  
instance. Here is what the installation dir has inside:  
[http://pastie.caboo.se/32595](http://pastie.caboo.se/32595)

(Note: the show\_page.rhtml file in the “app/views/site” was added today)

It seems to me the problem is with the HTTP Authentication part of the  
password\_protected behavior, which doesn’t seem to happen … (maybe  
because of litespeed?). I’m using the latest behavior available and I  
installed it as a plugin.

Thank you for you assistance.

L

---

<div class="post-metadata">

**Author:** ![luigi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/73ab20/32.png) [@luigi](https://www.ruby-forum.com/u/luigi)\
**Post date:** [January 19, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/password-protection-part-of-a-radiant-web-site/81660/8 "2007-01-19T16:31:28Z")

</div>

Many thanks for your assistance.

John W. Long wrote:

> Probably the easiest thing to do is to setup basic authentication with  
> an apache .htaccess file. Would that work for you?

It would work but how can be, for example, the  
“/official-documents/documents” page protected with .htaccess? In other  
words, where should I put the .htaccess file to protect a “virtual”  
radiant sub-sub-directory?

L

---

<div class="post-metadata">

**Author:** ![luigi](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/73ab20/32.png) [@luigi](https://www.ruby-forum.com/u/luigi)\
**Post date:** [September 25, 2007, 10:52pm UTC](https://www.ruby-forum.com/t/password-protection-part-of-a-radiant-web-site/81660/9 "2007-09-25T22:52:11Z")

</div>

Luigi,

Yeah .htaccess will not work under litespped or lighthttpd, so John’s  
suggestion probably won’t work. And if the password protection of the  
extension relies on HTTP auth, then it probably won’t work either.
