RE: [users@httpd] Can Apache automatically popup a dialogue box before allowing access to a file?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You can use this Chang's ideia (CGI) in a mix with the user authentication
ideia...

I explain, you can use Mod_auth_form
(http://www.csce.uark.edu/~ajarthu/mod_auth_form/) and the "authentication"
form is your disclaimer, when the user hit the "accept" button, your
authentication form handler (that don't ask for a username and password) make a
session to the user. 

The mod_auth_form is a authentication mod that intercept requests that dont has
a valid session (checked against a database backend), and so redirect the user
to a html form (in this case your disclaimer), your form should check user
credential (none credential in this case), end set the session on browser
(cookie) and on database, so redirect again the user to expected download.

This can solve your problem.

Klaubert Herr


--- "Ahn, Chang" <ahnc@xxxxxxxxxxxxxxxx> wrote:

>  I looked into using a protected realm, but with basic authentication, you
> can't change the login box, so I can't display a disclaimer.
> 
> A javascript solution would be ok (even with the possibility of disabling
> popups); however, how do I force everyone to view the JS popup for any and
> all requests for files (HTML, docs, pdf, etc.) in a specific directory.
> 
> I was think maybe writing my own handler that would call a CGI.  
> 
> The CGI would check for some disclaimer agreement cookie. 
> If not found, prompt the user with a disclaimer asking them to agree and
> submit.  Submit action would send the user back to the original request.
> If found, send them the original request (using PATH_TRANSLATION env).
> 
> This may sound lazy (probably because I am being lazy), but does anyone know
> a site with example scripts (preferably Perl based).  The Apache docs for
> AddHandler How-to talk about /cgi-bin/footer.pl. Anyone know if this actually
> exists and where I could find a sample?
> 
> 
> 
> -----Original Message-----
> From: Boyle Owen [mailto:Owen.Boyle@xxxxxxx] 
> Sent: Tuesday, June 20, 2006 2:14 AM
> To: users@xxxxxxxxxxxxxxxx
> Subject: RE: [users@httpd] Can Apache automatically popup a dialogue box
> before allowing access to a file?
> 
> > -----Original Message-----
> > From: Ahn, Chang [mailto:ahnc@xxxxxxxxxxxxxxxx]
> > Sent: Monday, June 19, 2006 9:55 PM
> > To: users@xxxxxxxxxxxxxxxx
> > Subject: [users@httpd] Can Apache automatically popup a dialogue box 
> > before allowing access to a file?
> > 
> > Can Apache automatically popup a dialogue box before allowing access 
> > to a file?
> 
> Basically, no. Popups are entirely under the control of the client (ie, the
> browser). 
> 
> Having said that, there a couple of things you can try:
> 
> - As Chris suggests, put the resource in a password protected realm and force
> a login.
> - Use javascript to make a popup and then redirect to the resource onClick().
> 
> NB - the javascript "solution" only works if the client doesn't disable
> popups...  
> 
> Rgds,
> Owen Boyle
> Disclaimer: Any disclaimer attached to this message may be ignored. 
> 
> > 
> > I know SSI will allow me to add html fragments to a HTML page but I 
> > need something that will work for MS docs, PDF, and other binary 
> > files.  Basically, I want my users to agree to a disclaimer (or see a 
> > disclaimer header/footer) before viewing
> > a document.   When a user attempts to access a specific area 
> > of my site, I want to popup some sort of dialog box asking them to 
> > agree to my usage disclaimer.  I'd prefer it if Apache could 
> > automatically display the dialogue box or footer on any file request 
> > within a specific directory.
> > 
> > - Chang
> > 
> > 
> Diese E-mail ist eine private und persönliche Kommunikation. Sie hat keinen
> Bezug zur Börsen- bzw. Geschäftstätigkeit der SWX Gruppe. This e-mail is of a
> private and personal nature. It is not related to the exchange or business
> activities of the SWX Group. Le présent e-mail est un message privé et
> personnel, sans rapport avec l'activité boursière du Groupe SWX.
>  
>  
> This message is for the named person's use only. It may contain confidential,
> proprietary or legally privileged information. No confidentiality or
> privilege is waived or lost by any mistransmission. If you receive this
> message in error, please notify the sender urgently and then immediately
> delete the message and any copies of it from your system. Please also
> immediately destroy any hardcopies of the message. You must not, directly or
> indirectly, use, disclose, distribute, print, or copy any part of this
> message if you are not the intended recipient. The sender's company reserves
> the right to monitor all e-mail communications through their networks. Any
> views expressed in this message are those of the individual sender, except
> where the message states otherwise and the sender is authorised to state them
> to be the views of the sender's company.
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux