Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XUSRA

XUSRA.m

Go to the documentation of this file.
  1. XUSRA ;ISCSF/RWF - Remote access control ;08/27/2003 10:11
  1. ;;8.0;KERNEL;**70,115,208,265**;Jul 10, 1995;Build 5
  1. Q ;No entry from top
  1. ;
  1. ;OUTSIDE app user cheking, The supported entry-points are:
  1. ;VALIDAV, INTRO, USERSET
  1. ;First parameter is always call-by-reference
  1. VALIDAV(RESULT,AVCODE) ;Check a users access
  1. ;Return DUZ^problem message^verify needs changing
  1. ;This entry point is subscription only.
  1. N X,XUSER,XUF,XRA1,XRA2,XUMSG
  1. K ^UTILITY($J),^TMP($J),^XUTL("XQ",$J)
  1. D SET1^XUS(0) S XRA1=$$INHIBIT^XUSRB,XRA2=0,XUF=0,DUZ=0,XUMSG=0
  1. I 'XRA1 S DUZ=$$CHECKAV^XUS(AVCODE) S:DUZ XRA2=$$VCVALID S:XRA2 DUZ=0,XRA1=12
  1. S XUMSG=$S(XRA1:XRA1,'DUZ:4,1:0),XUMSG=$S(XUMSG:$$TXT^XUS3(XUMSG),1:"")
  1. S RESULT=DUZ_U_XUMSG_U_XRA2
  1. Q
  1. ;
  1. INTRO(RESULT) ;Return INTRO TEXT.
  1. D INTRO^XUS1A("RESULT")
  1. Q
  1. VCVALID() ;Check if the Verify code needs changing.
  1. Q:'$G(DUZ) 1
  1. Q $G(^VA(200,DUZ,.1))+$P(^XTV(8989.3,1,"XUS"),"^",15)'>(+$H)
  1. ;
  1. CVC(RESULT,XU1) ;change VC
  1. S RESULT=0 Q:$G(DUZ)'>0 N XU2 S U="^",XU2=$P(XU1,U,2),XU1=$P(XU1,U)
  1. Q $$BRCVC^XUS2(XU1,XU2)
  1. ;
  1. USERSET(AV) ;sr. If a valid A/V setup DUZ for user.
  1. ;input: AV = accesscode_;_verifycode
  1. ;output: 0 = not OK ^ msg
  1. ; 1 = OK
  1. N NZ,X,XUSER,XUF,XUNOW,XUDEV,XUM,XUMSG,%1,VCOK K DUZ
  1. S DUZ=0,DUZ(0)="",VCOK=0,U="^",XUF=0,XUM=0,XUMSG=0 D NOW^XUSRB
  1. D SET1^XUS(0)
  1. S XUM=$$INHIBIT^XUSRB() I XUM G USX ;Logon inhibited
  1. S DUZ=$$CHECKAV^XUS(AV),XUM=$$UVALID^XUS() G:XUM USX
  1. S VCOK=$$VCVALID^XUSRB()
  1. USX I XUM S DUZ=0,XUMSG=$$TXT^XUS3(XUM)
  1. I 'XUM S XQXFLG("ZEBRA")=-1 D LOG^XUS1 ;Record the sign-on.
  1. Q $S(XUM:"0^"_XUMSG,1:1)
  1. ;