NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: osquiabro on January 04, 2020, 04:59:49 PM

Title: Report Security?
Post by: osquiabro on January 04, 2020, 04:59:49 PM
is possible to add security to a report for prevent a direct call?  like a browse and form that have user must be logged in

ex: mysite/callmyreport

thanks..
Title: Re: Report Security?
Post by: Bruce on January 05, 2020, 10:42:42 PM
yes,
noted.
that's an oversight - I'll sort it out.

cheers
Bruce
Title: Re: Report Security?
Post by: TimR on January 10, 2020, 12:55:47 PM
I created a little template to handle this. It assumes a NetWebServerWorker called p_web is present, I usually pass this into the procedure anyway, it's not perfect but works, feel free to use/modify as you like.

#TEMPLATE(MyTemplate,'My Templates'),FAMILY('ABC')
#EXTENSION(ReportLoginRequired,'Require Login for Nettalk Reports')
#AT(%AdditionalDebugHooks),PRIORITY(1000)
  If p_web.GetSessionLoggedIn() = 0
    p_web.SendError (401,'Unauthorized', 'A login is required to view this page')
    Return
  End
#ENDAT
Title: Re: Report Security?
Post by: osquiabro on February 03, 2020, 05:13:58 PM
Bruce, any news for this..
Title: Re: Report Security?
Post by: Bruce on February 10, 2020, 11:06:15 PM
Added for 11.30