[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference iosg::all-in-1_v30

Title:*OLD* ALL-IN-1 (tm) Support Conference
Notice:Closed - See Note 4331.l to move to IOSG::ALL-IN-1
Moderator:IOSG::PYE
Created:Thu Jan 30 1992
Last Modified:Tue Jan 23 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:4343
Total number of notes:18308

1464.0. "write-regardless problem still exists" by OASS::GREEN_W () Mon Sep 21 1992 20:30

    There is a note in the V2.4 conference (1739) referring to a problem
    that GPC had with write-regardless privs when the ALL-IN-1 username and
    the VMS username are different.  There is also a suggested fix in
    there.  
    
    This problem still seems to exist in V3.0 of ALL-IN-1, but the
    OAN$WRITE.SCP script has changed.  Will you please provide us with a
    new fix for V3.0 so that GPC will work correctly?
    
    Thank you,
    
    Wendy Green
    Atlanta/CSC supporting VAXnotes & GPC
T.RTitleUserPersonal
Name
DateLines
1464.1Notes Bug?IOSG::PYEGraham - ALL-IN-1 Sorcerer's ApprenticeTue Sep 22 1992 10:1211
    I unbderstood that the problem with Write-regardless and the notes
    file entry being different from the VMS account name, e.g.
    
    	ADD MEM "Graham Pye"/ACC=IOSG::PYE/PRIV=WRITE_REGARD
    
    Was a bug in the underlying Notes code. I don't know in which version
    of Notes it was fixed, if ever.
    
    Maybe we worked round it....
    
    Graham
1464.2Works for meSIOG::T_REDMONDThoughts of an Idle MindTue Sep 22 1992 10:1514
    I have just tested this out.  It seems that everything works, unless a
    conference is set to be /NOWRITE when a user has that conference open.
    In this case the symbol OA$NOTES_NOTEFILE_WRITELOCK is kept at "Y" (for
    users who already had the conference open), thus allowing another note
    to be written. Once the conference is closed the symbol is updated so
    if the user enters the conference again they won't be able to write a
    note.
    
    Is this what's happening?
    
    Tony
    
    PS. I wouldn't look for an "updated" script here.... The GPC
    development team is in "sleep mode" at the moment.
1464.3potential CLDOASS::GREEN_WTue Sep 22 1992 19:2937
    Tony,
    
    The problem occurs when the ALL-IN-1 username and the VMS usernames are
    different.  The fix that was given for V2.4 is as follows:
    
    In OAN$WRITE.SCP  --                                                    
                                                                                 
               Add                                                               
         .IF OAN$MEMBER.WRITE_BYPASS[OA$USER] EQS OA$Y THEN .GOTO
    ANSWER_NOTE_FORM
               Before                                                            
         .IF OAN$MEMBER.MODERATE[OA$USER] NES OA$Y THEN .GOTO
    NO_REPLY_ALLOWED_MSG
                                                                                 
                                                                                 
               Add                                                               
         .IF OAN$MEMBER.WRITE_BYPASS[OA$USER] EQS OA$Y THEN .GOTO
    CREATE_TOPIC_FORM
               Before                                                            
         .IF OAN$MEMBER.MODERATE[OA$USER] NES OA$Y THEN .GOTO
    REPLY_ONLY_MSG     
                                                                                
               Add                                                               
         .IF OAN$MEMBER.WRITE_BYPASS[OA$USER] EQS OA$Y THEN .GOTO
    CREATE_TOPIC_FORM
               Before                                                            
         .IF OAN$MEMBER.MODERATE[OA$USER] NES OA$Y THEN .GOTO
    REPLY_ONLY_MSG     
    
    
    My customer is very upset that there was a fix given in 2.4, yet the
    same problem exists in 3.0.  He wants a new fix ASAP, or he wants me to
    initiate a CLD.
                                                                                                                                                          
    	Thanks,
    
    	Wendy Green
1464.4So it is a real bug...SIOG::T_REDMONDThoughts of an Idle MindWed Sep 23 1992 09:49471
    OK. I see the problem. It's dealing with the privilege to bypass a
    writelock being set on a conference rather than obeying the writelock
    flag itself.  Sorry, I need new glasses.
    
    The way processing works is:
    
    1. Check to see if the conference is writelocked. If it is and we
       don't have the privilege to bypass the lock then abort.
    
    2. Go to the place where a note is either created or answered.
    
    3. Check again (paranoid) to see whether replies are permitted.
    
    I've inserted the necessary cut-outs in this version of the script. 
    Please test it before giving it to the customer.  I've done it here,
    and it works, but Murphy's 10th law of computing states that code
    bombs as soon as it leaves the hands of the author.  Also, please
    submit an SPR so the bug gets tracked and fixed officially.
    
    Tony
    
!+
!	OAN$WRITE.SCP		Create a note or topic
!+

.LABEL START
!	Some initial clearing out of symbols

	 GET #OAN_SAVEDOC = OA$CURDOC\GET #OAN_SAVECUR = #CURDOC\-
	   GET #CURDOC = "#GPCDOC"\GET #TITLE = ''

	.IF #OAN_PROMPT = '' 
	.THEN
	     GET #OAN_PROMPT = 1
	.END_IF

!	If the conference is writelocked and the user doesn't have the
!	necessary privilege to bypass the writelock, then we must stop them
!	creating any more topics or replies (V3.0 change)

	.IF (OA$NOTES_NOTEFILE_WRITELOCK EQS OA$Y) AND -
	    (OA$NOTES_WRITE_PRIVILEGE    EQS OA$N) -
		THEN .GOTO NOTEFILE_WRITELOCK

.LABEL WRITELOCK_CHECKED
!	Continue to set up symbols etc.

	GET #OAN_WRITING_NOTE = " "
	GET #OAN_FC = OA$N\GET #OAN_EDIT_DOC = OA$Y

!	Check what type of note we want to create...

	.IF #NOTETYPE EQS "AN" THEN .GOTO ANSWER_NOTE
	.IF #NOTETYPE EQS "CT" THEN .GOTO CREATE_TOPIC

	DISPLAY Invalid qualifier given to OAN$WRITE.SCP - Aborting....
	.GOTO RESTORE_EXIT

.LABEL ANSWER_NOTE
!	Check to see if replies are allowed - if the user is a moderator 
!	then we'll let them reply, even if the note is set to be "no reply".

	.IF OA$NOTES_WRITE_PRIVILEGE EQS OA$Y THEN .GOTO ANSWER_NOTE2

	.IF (OA$NOTES_NOTE_REPLY_ALLOWED EQS OA$N) AND -
	    (OA$NOTES_MODERATOR_PRIVILEGE EQS OA$N) -
	    THEN -
		 .GOTO NO_REPLY_ALLOWED

.LABEL ANSWER_NOTE2

	.IF (OA$NOTES_NOTE_REPLY_ALLOWED EQS OA$N) AND -
	    (OA$NOTES_MODERATOR_PRIVILEGE EQS OA$Y) 
	.THEN 
	     NOTES SET_MODERATOR = OA$Y
	     GET #OAN_MODERATOR = 1
	.END_IF

.LABEL ANSWER_NOTE_FORM

	FORM OAN$ANSWER$NOTE
	.GOTO CONTINUE_PROCESSING

.LABEL CREATE_TOPIC
!	Check to see whether or not the notes conference is set to allow
!	no new topics to be created.  If the user isn't a moderator then
!	we have to stop them here.

	.IF OA$NOTES_WRITE_PRIVILEGE EQS OA$Y THEN .GOTO CREATE_TOPIC2

	.IF (OA$NOTES_NOTEFILE_REPLY_ONLY EQS OA$Y) AND -
	    (OA$NOTES_MODERATOR_PRIVILEGE EQS OA$N) -
	    THEN -
		.GOTO REPLY_ONLY

.LABEL CREATE_TOPIC2

	.IF (OA$NOTES_NOTEFILE_REPLY_ONLY EQS OA$Y) AND -
	    (OA$NOTES_MODERATOR_PRIVILEGE EQS OA$Y) -
	    THEN -
		NOTES SET_MODERATOR OA$Y\\-
		GET #OAN_MODERATOR = 1

.LABEL CREATE_TOPIC_FORM

	FORM OAN$WRITENOTE

.LABEL CONTINUE_PROCESSING

	.IF OA$FORM_DISPOSE NE 2 THEN .GOTO ABORT_EXIT
!+
!	Create filenames for later use
!-
	 GET #OAN_ASCIIFILE = "OA$TEMP:NOTES_" OA$DATE_NBS:10:6 ".TXT"
	.IF $OAN_EDITOR EQS "" 
	.THEN 
	   GET $OAN_EDITOR = OA$DEFAULT_EDITOR
	.END_IF

         GET #OAN_EDITFILE = -
		 "OA$TEMP:NOTES_" OA$DATE_NBS:10:6 OA$DEFAULT_EXTENSION
!
	.IF #OAN_NEXT EQ 1 THEN .GOTO GET_FILE_CABINET_DOCUMENT
	.GOTO FILE_BEING_EDITED

.LABEL GET_FILE_CABINET_DOCUMENT

	GET #OAN_FC = OA$Y
	GET #OAN_FOLDER = #OAN_TITLE = #OAN_DOCNUM = ""

	.IF #CURDOC EQS ""
	.THEN
		GET #CURDOC = #OANSAVE_CUR = $WPDOC
	.END_IF

	FORM OAN$SELDOC/BEGIN=FOLDER\OA$MSG_PURGE

	.IF OA$FORM_DISPOSE NE 2 THEN .GOTO ABORT_EXIT
	.IF #OAN_FOLDER NES "" THEN .GOTO GOT_SOMETHING
	.IF #OAN_TITLE NES "" THEN .GOTO GOT_SOMETHING
	.IF #OAN_DOCNUM NES "" THEN .GOTO GOT_SOMETHING

!	If we've gotten through to here it means that we haven't been given
!	anything to select with so we go directly to creating a new file

	.GOTO FILE_BEING_EDITED

.LABEL GOT_SOMETHING

!	Proceed to select the required file

	CABINET SELECT #OAN_FOLDER, #OAN_DOCNUM, #OAN_TITLE, @#CURDOC
	.IF OA$STATUS EQ 0 THEN .GOTO NOT_FOUND
	
!	Got a document - so now we have to translate it to ASCII, then we
!	go and try and write it into the conference.

	.IF #OAN_EDIT_DOC EQS OA$Y THEN .GOTO EDIT_FCDOC

	.IF $OAN_FULL_MESSAGE_TEXT EQS OA$Y 
	.THEN 
		COPY "@OA$CURDOC" #OAN_ASCIIFILE
	.ELSE
		COPY OA$CURDOC_FILENAME #OAN_ASCIIFILE
	.END_IF

	.GOTO PLACE_NOTE_IN_CONFERENCE

.LABEL EDIT_FCDOC

	.IF $OAN_FULL_MESSAGE_TEXT EQS OA$Y 
	.THEN 
		COPY "@OA$CURDOC" #OAN_EDITFILE
	.ELSE
		COPY OA$CURDOC_FILENAME #OAN_EDITFILE
	.END_IF

.LABEL FILE_BEING_EDITED

!	In order to have something in the WPS-PLUS status block create
!	a dummy entry in the File Cabinet.  This will be later deleted.

	GET #OAN_OLD_DRAWER = OA$CURDWR
	CABINET SET_DRAWER OA$MAIL_DRAWER

        CABINET CREATE OA$_NOTES_MAIN_MENU, , #OAN_CURDOC
	GET #OAN_FOLDER = OA$_NOTES_MAIN_MENU
	GET #OAN_DOCNUM = #OAN_CURDOC:6:30
	GET #OAN_TITLE  = #OAN_NOTE_TITLE
	CABINET ADD_ATTR , "TITLE", #OAN_NOTE_TITLE
	CABINET SELECT #OAN_FOLDER, #OAN_DOCNUM, #OAN_NOTE_TITLE, @#CURDOC
	.IF OA$STATUS EQ 0 THEN .GOTO NOT_FOUND

!	Here we have either got a copy of a FC document, or we create
!	a temporary file for the user to edit into	

	EDIT #OAN_EDITFILE,,,$OAN_EDITOR
	CABINET DELETE_DOCUMENT #OAN_CURDOC
	.IF OA$FORM_DISPOSE NE 2 THEN .GOTO BAD_EDIT

	CABINET SET_DRAWER #OAN_OLD_DRAWER
	GET #WPS_SYS_STATUS = #WP_SYS_COMPLETION = 1
!

! 	Check for the special case, where GOLD G was used and priv lost
!
	.IF #OAN_MODERATOR EQ 1 
	.THEN  
	     NOTES SET_MODERATOR OA$Y
        .END_IF

	.GOTO CHECK_FOR_CONVERSION
	.GOTO RESTORE_EXIT

.LABEL CHECK_FOR_CONVERSION

!	May have to convert to ASCII unless we've been using an ASCII editor

	.IF #OAN_EDITFILE NES #OAN_ASCIIFILE 
        .THEN 
	    COPY #OAN_EDITFILE #OAN_ASCIIFILE
        .END_IF

.LABEL PLACE_NOTE_IN_CONFERENCE
!	If the note was set to be (nowrite), and we ignored it anyway by
!	overriding it with moderator privilege, then we had better set the
!	new reply to be nowrite.

	.IF (OA$NOTES_NOTE_REPLY_ALLOWED EQS OA$N) AND -
            (#OAN_MODERATOR EQ 1)
        .THEN 
             GET #OAN_DISABLE_REPLIES = OA$Y
	.ELSE
	     GET #OAN_DISABLE_REPLIES = OA$N
	.END_IF

!	But if the user decided to set NO_WRITE in the OAN$WRITENOTE form
!	we had better give it priority...

	.IF #OAN_SET_NOWRITE EQS OA$N
	.THEN
	     GET #OAN_DISABLE_REPLIES = OA$Y
        .ELSE
             GET #OAN_DISABLE_REPLIES = OA$N
        .END_IF

	.IF (#OAN_NOASK_WRITE EQS OA$Y) OR -
	    ($OAN_CONFIRM_PROMPT EQS OA$N) OR -
	    (NOT #OAN_PROMPT) -
	    THEN .GOTO KEEP_ON_WRITING

!	Ask them do they want to write the note.... if not, we'll go down
!	to a place where we can file the note into the cabinet. #OAN_IN_LIST
!	will be 1 if we're doing this from the OAN$LIST form.
	
	.IF #OAN_IN_LIST EQ 1 THEN .GOTO DEMAND_AN_ANSWER2
	
.LABEL DEMAND_AN_ANSWER1

   	YESNO_PROMPT OA$_NOTES_CONFIRM_WRITE\OA$FLD_STAY
	.IF (OA$PROMPT_TEXT:1 EQS OA$N) OR -
	    (OA$PROMPT_DISPOSE NE 2) -
	    THEN -
              .GOTO OFFER_REFILE
	.IF OA$PROMPT_TEXT:1 EQS OA$Y THEN .GOTO KEEP_ON_WRITING
!	Didn't get a Y or N so go back and ask for something reasonable

	.GOTO DEMAND_AN_ANSWER1

.LABEL DEMAND_AN_ANSWER2

	CLOSE_PRIOR
	GET #OAN_DISPLAY_MESSAGE = NOTES$_CONFIRM_WRITE
	FORM OAN$DISPLAY$MESSAGE
	.IF #OAN_ANSWER:1 EQS OA$Y THEN .GOTO KEEP_ON_WRITING
	.IF (#OAN_ANSWER:1 EQS OA$N) OR (OA$PROMPT_DISPOSE NE 2) -
	  THEN .GOTO OFFER_REFILE

.LABEL KEEP_ON_WRITING

	CLOSE_PRIOR
	OA$FAO NOTES$_NOTE_WRITING,"OA$DISPLAY",$OAN_CONFERENCE\FORCE
	
	.IF #NOTETYPE EQS "AN" THEN .GOTO PLACE_ANSWER_IN_CONFERENCE
	
!	Write the new topic into the conference

	NOTES WRITE #OAN_ASCIIFILE,#OAN_NOTE_TITLE, #OAN_DISABLE_REPLIES, -
			#OAN_NOTE_HIDDEN
	.IF NOT OA$STATUS THEN .GOTO ERROR
	.GOTO ALL_DONE

.LABEL PLACE_ANSWER_IN_CONFERENCE

!	Write the reply to the current note in conference

	NOTES ANSWER #OAN_ASCIIFILE,#OAN_NOTE_TITLE,,#OAN_NOTE_HIDDEN
	.IF NOT OA$STATUS THEN .GOTO ERROR
	
.LABEL ALL_DONE
!	Check to see if there's a keyword around

	.IF #OAN_NOTE_KEYWORDS EQS "" THEN .GOTO FINISH
	 GET_TOKEN #OAN_NOTE_KEYWORDS, #KEYWORD, ","
	 NOTES ADD_KEYWORD #KEYWORD, OA$NOTES_NOTE_ID
	.IF NOT OA$STATUS THEN .GOTO ERROR
	.GOTO ALL_DONE
!
.LABEL FINISH

!	Update the notebook and set the note that we've just written to
!	be seen

	NOTES SET_SEEN OA$NOTES_NOTE_ID\NOTES UPDATE OA$NOTES_ENTRY_NAME
	NOTES SELECT OA$NOTES_NOTE_ID
	OA$MSG_PURGE
	OA$FAO NOTES$_NOTE_WRITTEN,"OA$DISPLAY",$OAN_CONFERENCE\FORCE
	GET #OAN_NOASK_WRITE = OA$N
	.GOTO COMMON_EXIT

.LABEL OFFER_REFILE

	CLOSE_PRIOR
	.IF #OAN_EDIT_DOC NES OA$Y THEN .GOTO COMMON_EXIT
	GET #OAN_WRITING_NOTE = OA$Y
	GET #CURDOC = #OAN_SAVECUR
	DO OAN$FILE_NOTE
	.GOTO COMMON_EXIT

.LABEL NOT_FOUND

	FORM OAN$SELDOC/BEGIN=FOLDER/PRE='GET OA$DISPLAY = OA$_WP_NOFINDDOC'
	.GOTO GET_FILE_CABINET_DOCUMENT

.LABEL BAD_EDIT

	GET OA$DISPLAY = OA$_NOTES_EDIT_ABORTED\FORCE

.LABEL COMMON_EXIT
	
	.IF #OAN_MODERATOR EQ 1
	.THEN  
    	    NOTES SET_MODERATOR OA$N
	    GET #OAN_MODERATOR = 0
	.END_IF

	GET OA$FUNCTION = "DELETE_FILE " #OAN_ASCIIFILE
	GET OA$FUNCTION = "DELETE_FILE " #OAN_EDITFILE

.LABEL ABORT_EXIT

	GET #NOTETYPE = ""
	.GOTO RESTORE_EXIT

.LABEL NO_REPLY_ALLOWED

	GET OA$DISPLAY = NOTES$_REPLIES_PROHIBIT
	.GOTO RESTORE_EXIT

.LABEL REPLY_ONLY

	GET OA$DISPLAY = NOTES$_ERROR_REPLIES_ONLY
	.GOTO RESTORE_EXIT

.LABEL NOTEFILE_WRITELOCK

	.IF OA$NOTES_MODERATOR_PRIVILEGE EQS OA$N 
	.THEN
  	    GET #OAN_STATUS = 0 
	    GET OA$DISPLAY = NOTES$_ERROR_CANT_WRITE
        .ELSE
	    GET #OAN_STATUS = 1
            NOTES SET_MODERATOR OA$Y
	    GET #OAN_MODERATOR = 1
	.END_IF
	
	.IF #OAN_STATUS EQ 1 -
	 THEN .GOTO WRITELOCK_CHECKED
	
	.GOTO RESTORE_EXIT

.LABEL ERROR

	GET OA$DISPLAY = NOTES$_ERROR_CANT_ADD1\FORCE
	GET #OAN_WRITING_NOTE = OA$Y
	GET #OAN_NO_REFILE = OA$Y
	DO OAN$FILE_NOTE

!	Did the user bother to store the note?

	.IF #OAN_NO_REFILE EQS OA$Y -
	     THEN .GOTO RESTORE_EXIT

	GET #NEW_DOC = OA$CURDOC_DOCNUM " " OA$CURDOC_TITLE
	OA$FAO OA$_NOTES_ERROR_CANT_ADD2,"OA$DISPLAY",#NEW_DOC

.LABEL RESTORE_EXIT

!	Restore the things we (may have) changed

	.IF #OAN_SAVEDOC NES "" 
	.THEN 
		CABINET CURRENT #OAN_SAVEDOC
	.END_IF
	.IF #OAN_MODERATOR EQ 1
	.THEN
	    NOTES SET_MODERATOR OA$N
            GET #OAN_MODERATOR = 0
	.END_IF

	GET #CURDOC = #OAN_SAVECUR
	.EXIT
!
! Author: REDMOND 
!
! Modified by: 		 | Date:                | Reason:
!-----------------------------------------------------------------------------
! REDMOND                | 09-Jun-1989 04:16pm  | Element created, please state
!                        |                      | modifications down here
!			 |			|
! EISENSEE		 | 28-aug-1989          | New filenames introduced +
!			 |			| edit filecabinet document.
!			 |			| Programming for moderators
!			 |			|
! Stuart Dawson		 | 06-Dec-1989          | WPS-PLUS status display needs 
!			 |			| reply to be current document,
!			 |			| FC entry for reply deleted,
!			 |			| Save/restore current document.
!			 |			|
! Stuart Dawson		 | 06-Mar-1990          | All partially edited replies
!			 |			| /topics can be saved as a new
!			 |			| folder/document.
!			 |			| 
! Tony Redmond		 | 06-Sep-1991	        | Drawer Support for ALL-IN-1 
!                        |                      | V3.0, plus an extra PST
!		         |			| symbol to control whether we
!		         |                      | import the full text of a 
!			 |			| message (including the 
!			 |			| attributes), or just the
!			 |			| text itself.
!			 !			!
! Tony Redmond           ! 30-Sep-1991          ! Use OA$NOTES_WRITE_PRIVILEGE
!			 !		        ! and OA$NOTES_MODERATOR_PRIVILEGE
!			 !                      ! to control access to a 
!		         !			! conference.
    ! Tony Redmond           ! 13 Feb 1992          ! Fix for ALL-IN-1 V3.1      
    ! Tony Redmond           ! 23 Sep 1992          ! Allow users with
    !                        !                      ! write bypass privilege
    !                        !                      ! to ignore WRITELOCK (note 1464 in IOSG::ALL-IN-1)
!+---------------------------------------------------------------------------+
!
!	Script to write a note into the VAX Notes conference that's 
!	currently selected.   This script will handle new topics (CTs) or
!	answers to current notes (ANs).
!
!			  COPYRIGHT � 1989, 1992 BY
!	      DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
!
! This software is furnished under a license and may be used and  copied
! only  in  accordance  with  the  terms  of  such  license and with the
! inclusion of the above copyright notice.  This software or  any  other
! copies  thereof may not be provided or otherwise made available to any
! other person.  No title to and ownership of  the  software  is  hereby
! transferred.
!
! The information in this software is subject to change  without  notice
! and  should  not  be  construed  as  a commitment by DIGITAL EQUIPMENT
! CORPORATION.
!
! DIGITAL assumes no responsibility for the use or  reliability  of  its
! software on equipment which is not supplied by DIGITAL.