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

XQSMD2.m

Go to the documentation of this file.
  1. XQSMD2 ; SEA/MJM - Secure MenuMan Delegation (Cont.) ;7/3/91 08:42 ;8/21/92 11:58 AM [ 04/02/2003 8:29 AM ]
  1. ;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
  1. ;;8.0;KERNEL;;Jul 10, 1995
  1. S U="^",XQMG=DUZ,XQNGO=0
  1. BUILD ;Put remaining options into Delgate Options File
  1. S (XQM,XQN)="" D LIST I XQM=-1!(XQN=-1) G OUT
  1. D:$Y+2>IOSL WAIT W !!!,"Ready to ",$S(XQDOP:"remove these options from",1:"delegate these options to")," these people? Y// " R XQ:DTIME S:'$T XQ=U G:XQ=U OUT S:XQ="" XQ="Y" G:"YyNn"'[XQ BUILD
  1. I XQ["N"!(XQ["n") W !!,"Fine, you may edit the user or option list, or enter a '^' to quit." G NAME^XQSMD
  1. I '$D(^TMP($J,"OP")) W !!,"No options found, no action taken.",*7 G OUT
  1. ;
  1. ZTLOAD ;Set up Taskman parameters an queue the request
  1. S ZTRTN="ZTSK^XQSMD31",ZTDTH=$H,ZTIO="",(XQDESC,ZTDESC)=XQMGR_" "_$S(XQDOP:"remov",1:"add")_"ing delegated options"
  1. S ZTSAVE("^TMP($J,")="",ZTSAVE("XQDOP")="",ZTSAVE("XQLEV")="",ZTSAVE("XQHOLD(")="",ZTSAVE("XQPRO")=""
  1. D ^%ZTLOAD
  1. W !!,"Request to ",$S(XQDOP:"remove",1:"add")," delegated options has been queued, task # ",ZTSK,",",!?5,"named: ",XQDESC,"."
  1. ;
  1. SCAN ;Scan selected options for restrictions and report them
  1. S XQN=""
  1. F XQI=0:0 D:$Y+3>IOSL WAIT Q:XQ=U S XQN=$O(^TMP($J,"ZN",XQN)) Q:XQN="" S XQON0=^(XQN) S:$L($P(XQON0,U,5)) XQLK(XQN)=$P(XQON0,U,5) D:$L($P(XQON0,U,2)) OOO D RTIM D:$L($P(XQON0,U,9)) RDEV
  1. S XQKEY(0)="",XQN="",DIC=19.1,DIC(0)="FMXZ",XQI=0
  1. F XQJ=0:0 S XQN=$O(XQLK(XQN)) Q:XQN="" S X=XQLK(XQN) D ^DIC I Y>0,'$D(XQKEY(+Y)),$S($D(^XUSEC("XUMGR",DUZ)):1,$D(^VA(200,DUZ,52,"B",+Y)):1,1:0) S XQKEY(+Y)="",XQI=XQI+1
  1. ;
  1. I $O(XQKEY(0))'="" D KEYS^XQSMD21 ;Allocate keys for locked options
  1. ;
  1. G OUT
  1. Q
  1. ;
  1. OOO W !,XQN," is out of order with the string: '",$P(XQON0,U,2),"'" Q
  1. ;
  1. RTIM ; Identify and display prohibited times for option
  1. S %A="",XQON=$O(^DIC(19,"B",XQN,0)) I $D(^DIC(19,XQON,3.91)) F %XQI=0:0 S %XQI=$O(^DIC(19,XQON,3.91,%XQI)) Q:%XQI'>0 W !,XQN," is PROHIBITED during the times ",$P(^(%XQI,0),U,1),$P(^(0),U,2)," (military time)." K %A
  1. K %XQI I $D(%A) K %A I $L($P(XQON0,U,8)) W !,XQN," is PROHIBITED during the times ",$P(XQON0,U,8)," (military time)."
  1. Q
  1. ;
  1. RDEV W !,XQN," is restricted to run on only certain devices." Q
  1. ;
  1. LIST ;List users and options selected so far.
  1. W @IOF S (XQT,XQM)=0,XQM=$O(XQHOLD(XQM)) I XQM="" W !!," No users selected yet." S XQM=-1 Q
  1. W !!,"For the following user(s):",!
  1. F XQI=1:1 D:$Y+2>IOSL WAIT Q:XQ=U W:'(XQT#2) ! W ?(XQT#2*35),XQI,". ",XQHOLD(XQM) S XQT=XQT+1,XQM=$O(XQHOLD(XQM)) Q:XQM=""
  1. W !!,"You will ",$S(XQDOP:"remove ",1:"delegate "),"the following options: ",!
  1. S XQT=0,XQN="",XQN=$O(^TMP($J,"ZN",XQN)) I XQN="" W !!,"No menu options selected yet" S XQN=-1 Q
  1. F XQI=0:0 D:$Y+2>IOSL WAIT Q:XQ=U W !,XQN," ",$P(^TMP($J,"ZN",XQN),U,1) S XQN=$O(^(XQN)) Q:XQN=""
  1. W !!,$S(XQDOP:" Removed ",1:" Delegated "),"by ",XQMGR," on ",XQDATE,".",!
  1. S XQ=""
  1. Q
  1. WAIT ;Skip to the head of the next page
  1. I 1 S XQ="" R:IOST["C-" !?26,"Press RETURN to continue,'^' to quit.",XQ:DTIME S:'$T XQ=U W @IOF
  1. Q
  1. ;
  1. OUT K DIC,DIK,DA,DISYS,DINUM,POP,XQ,XQH,XQI,XQJ,XQK,XQL,XQM,XQN,XQT,XQON0,XQAL,XQDATE,XQDEL,XQDESC,XQDT,XQDUZ,XQLEV,XQLK,XQMG,XQMGR,XQNAM,XQNGO,XQUF,XQPRO,XQSTART,XQEND,XQHOLD,XQKEY,ZTSK,X,Y,XY,%,^TMP($J)
  1. K ZTRTN,ZTDTH,ZTIO,ZTDESC,ZTSAVE,XQDOP,C,XQU1L
  1. Q