NetTalk Central

Author Topic: Form "only serv if"  (Read 3027 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1849
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Form "only serv if"
« on: March 06, 2014, 01:24:02 PM »
Hi,
NT6.55

I need to limit the access of a loggedin user to a form that is not of its property.
Suppouse a user logged in try to access a record from another user typing:

http://127.0.0.1:88/uPatient?change_btn=change&dat:id=1

Then I check for that in the "only serv if" returning a -3 if the page must not be served, some code like:

  If (p_stage=ChangeRecord + NET:WEB:StagePre or p_stage=DeleteRecord + NET:WEB:StagePre)
     if VerCliUser(DAT:ID_MAIN_CLINIC,p_web.gsv('login_id')) = false
        Return -3
     end
  End

I´ve verified that the return -3 is executed but the page is served.

This code used to work on earlier version of NTWS.

Any thing I can change to make it work?

Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11194
    • View Profile
Re: Form "only serv if"
« Reply #1 on: March 06, 2014, 09:53:07 PM »
I'm sorry, I don't understand the question.

cheers
Bruce

Alberto

  • Hero Member
  • *****
  • Posts: 1849
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Form "only serv if"
« Reply #2 on: March 07, 2014, 11:16:03 AM »
Sory,
Supouse you have two users, each one loggsin with its own user/pass
There are a Patients Table in which each user add its patients and they can see only its own patientes because of the browse filter.
But if any user type in thee xplorer:

http://YourServer/uPatient?change_btn=change&dat:id=1

and the patient with that dat:id is from another user, it can see and change a patient wich does not own.

Is it more clear?

Thanks
-----------
Regards
Alberto

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: Form "only serv if"
« Reply #3 on: March 12, 2014, 04:52:06 AM »
Using sequential ID numbers is not recommended. Also, there are some changes in NT7 to avoid the problem you describe.

Alberto

  • Hero Member
  • *****
  • Posts: 1849
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Form "only serv if"
« Reply #4 on: March 12, 2014, 02:02:26 PM »
Thanks Kevin,
Where can I read about this NT7 new feature.
Regards
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11194
    • View Profile
Re: Form "only serv if"
« Reply #5 on: March 12, 2014, 09:05:59 PM »
see FAQ W4

urayoan

  • Full Member
  • ***
  • Posts: 222
    • View Profile
    • AZ Rock Radio
Re: Form "only serv if"
« Reply #6 on: March 13, 2014, 08:03:05 AM »

Alberto

  • Hero Member
  • *****
  • Posts: 1849
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Form "only serv if"
« Reply #7 on: March 13, 2014, 11:52:41 AM »
Thank you very much,
I realized thet this method exists in NT6 too
The goal would be an option for the form to work only if it is called with _bdiv_ param
This will avoid the use of xxx:id=nn
May be this is what NT7 has?
Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11194
    • View Profile
Re: Form "only serv if"
« Reply #8 on: March 13, 2014, 09:46:51 PM »
NT7?  That's soooo yesterday....

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Form "only serv if"
« Reply #9 on: March 14, 2014, 12:04:01 AM »
You can only say that tomorrow  :)
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Alberto

  • Hero Member
  • *****
  • Posts: 1849
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Form "only serv if"
« Reply #10 on: March 14, 2014, 01:59:14 AM »
ok, ok NT8
but how about my idea?
-----------
Regards
Alberto