Files
open-insight/LSL2/STPROC/SECURITY_ERR_MSG.txt
2024-03-25 14:46:21 -07:00

38 lines
1.1 KiB
Plaintext

compile subroutine security_err_msg( TableName, ErrType )
begin condition
pre:
post:
end condition
declare subroutine msg
$insert msg_equates
$insert logical
$insert security_rights_equ
MsgRec = ''
MsgRec<mcol$> = -2
MsgRec<mrow$> = -2
begin case
case ErrType = Read$
MsgRec<mtext$> = 'You do not have READ rights to the ':TableName:' table.'
MsgRec<micon$> = 'H'
msg( '', MsgRec )
case ErrType = Write$
MsgRec<mtext$> = 'You do not have WRITE rights to the ':TableName:' table.'
MsgRec<micon$> = 'H'
msg( '', MsgRec )
case ErrType = Edit$
MsgRec<mtext$> = 'You do not have EDIT rights to the ':TableName:' table you will not be able to change any data on existing records.'
MsgRec<micon$> = '!'
msg( '', MsgRec )
case ErrType = Delete$
MsgRec<mtext$> = 'You do not have DELETE rights to the ':TableName:' table.'
MsgRec<micon$> = 'H'
msg( '', MsgRec )
case ErrType = Print$
MsgRec<mtext$> = 'You do not have PRINT rights to the ':TableName:' table.'
MsgRec<micon$> = 'H'
msg( '', MsgRec )
case otherwise$
end case