XMXSEC3 ;ISC-SF/GMB-Message security and restrictions (cont.) ;04/18/2002 08:01
;;8.0;MailMan;;Jun 28, 2002
; All entry points covered by DBIA 2733.
OPTWNO(XMORIGN8) ; Surrogate does not have 'write' privilege.
D Q("A",37401.5) ; You need 'send' privilege to Answer a message.
D Q("C",37403.5) ; You need 'send' privilege to Copy a message.
D Q("E",37405.5) ; You need 'send' privilege to Edit a message.
I XMORIGN8 D Q("IN",37409.5) ; You need 'send' privilege to toggle 'Information only'.
E D Q("IN",37409.1) ; Only the originator may toggle 'Information only'.
D Q("W",37444.5) ; You need 'send' privilege to Write (send) a message.
Q
Q(XMCD,XMDN) ;
I $G(XMQDNUM) S XMOPT(XMCD,"?")=XMDN Q
S XMOPT(XMCD,"?")=$$EZBLD^DIALOG(XMDN)
Q
DOSHARE(XMDUZ,XMK,XMORIGN8,XMINSTR) ;
N I,XMNO
S XMNO=$S($G(XMQDNUM):37462,1:$$EZBLD^DIALOG(37462)) ; You may not do this in SHARED,MAIL.
F I="A","E","IN","K","L","N","W","X" S XMOPT(I,"?")=XMNO
Q:XMORIGN8
D Q("C",37403.6) ; Only the originator may Copy a message in SHARED,MAIL.
D Q("F",37406.6) ; Only the originator may Forward a message from SHARED,MAIL.
I XMK,$S($D(^XUSEC("XMMGR",DUZ)):0,$D(^XMB(3.7,"AB",DUZ,.5)):0,1:1) D
. N DIR,I
. ; You must be the originator, hold the XMMGR key,
. ; or be a POSTMASTER surrogate to do this in SHARED,MAIL.
. I $G(XMQDNUM) D Q
. . F I="D","S","T","V" S XMOPT(I,"?")=37461
. D BLD^DIALOG(37461,"","","DIR(""?"")")
. F I="D","S","T","V" M XMOPT(I,"?")=DIR("?")
Q
DOPOST ; You may not do this with messages in the transmit queues.
N XMNO,I
S XMNO=$S($G(XMQDNUM):37251,1:$$EZBLD^DIALOG(37251))
F I="A","AA","B","C","E","IN","H","K","L","N","P","R","S","T","V","W","X" S XMOPT(I,"?")=XMNO
K XMOPT("X"),XMOX("X",XMOX("O","X")),XMOX("O","X")
D SET^XMXSEC2("X",37447,.XMOPT,.XMOX) ; Xmit Priority Toggle
Q
XMXSEC3 ;ISC-SF/GMB-Message security and restrictions (cont.) ;04/18/2002 08:01
+1 ;;8.0;MailMan;;Jun 28, 2002
+2 ; All entry points covered by DBIA 2733.
OPTWNO(XMORIGN8) ; Surrogate does not have 'write' privilege.
+1 ; You need 'send' privilege to Answer a message.
DO Q("A",37401.5)
+2 ; You need 'send' privilege to Copy a message.
DO Q("C",37403.5)
+3 ; You need 'send' privilege to Edit a message.
DO Q("E",37405.5)
+4 ; You need 'send' privilege to toggle 'Information only'.
IF XMORIGN8
DO Q("IN",37409.5)
+5 ; Only the originator may toggle 'Information only'.
IF '$TEST
DO Q("IN",37409.1)
+6 ; You need 'send' privilege to Write (send) a message.
DO Q("W",37444.5)
+7 QUIT
Q(XMCD,XMDN) ;
+1 IF $GET(XMQDNUM)
SET XMOPT(XMCD,"?")=XMDN
QUIT
+2 SET XMOPT(XMCD,"?")=$$EZBLD^DIALOG(XMDN)
+3 QUIT
DOSHARE(XMDUZ,XMK,XMORIGN8,XMINSTR) ;
+1 NEW I,XMNO
+2 ; You may not do this in SHARED,MAIL.
SET XMNO=$SELECT($GET(XMQDNUM):37462,1:$$EZBLD^DIALOG(37462))
+3 FOR I="A","E","IN","K","L","N","W","X"
SET XMOPT(I,"?")=XMNO
+4 IF XMORIGN8
QUIT
+5 ; Only the originator may Copy a message in SHARED,MAIL.
DO Q("C",37403.6)
+6 ; Only the originator may Forward a message from SHARED,MAIL.
DO Q("F",37406.6)
+7 IF XMK
IF $SELECT($DATA(^XUSEC("XMMGR",DUZ)):0,$DATA(^XMB(3.7,"AB",DUZ,.5)):0,1:1)
Begin DoDot:1
+8 NEW DIR,I
+9 ; You must be the originator, hold the XMMGR key,
+10 ; or be a POSTMASTER surrogate to do this in SHARED,MAIL.
+11 IF $GET(XMQDNUM)
Begin DoDot:2
+12 FOR I="D","S","T","V"
SET XMOPT(I,"?")=37461
End DoDot:2
QUIT
+13 DO BLD^DIALOG(37461,"","","DIR(""?"")")
+14 FOR I="D","S","T","V"
MERGE XMOPT(I,"?")=DIR("?")
End DoDot:1
+15 QUIT
DOPOST ; You may not do this with messages in the transmit queues.
+1 NEW XMNO,I
+2 SET XMNO=$SELECT($GET(XMQDNUM):37251,1:$$EZBLD^DIALOG(37251))
+3 FOR I="A","AA","B","C","E","IN","H","K","L","N","P","R","S","T","V","W","X"
SET XMOPT(I,"?")=XMNO
+4 KILL XMOPT("X"),XMOX("X",XMOX("O","X")),XMOX("O","X")
+5 ; Xmit Priority Toggle
DO SET^XMXSEC2("X",37447,.XMOPT,.XMOX)
+6 QUIT