Class SY_Security

Known SubClasses

SY_ResourceSecurity

Properties

LOCAL cTaskKeyMask$="000000000"  
LOCAL cAllCompanies$="0000000000"  
LOCAL cDefaultUser$="0000000000"  
LOCAL cURLUser$="0000000001"  
LOCAL cEBMUser$="0000000002"  
LOCAL cDefaultRole$="0000000000"  
LOCAL cValChars$  
LOCAL cTaskMaintenance$="M"  
LOCAL cTaskUpdate$="U"  
LOCAL cTaskAccess$="A"  
LOCAL cTaskMenu$="T"  
LOCAL cTaskSetup$="S"  
LOCAL cTaskInquiry$="I"  
LOCAL cSecurityEvent$="04"  
LOCAL cInquiryTask$="01"  
LOCAL cReportFormTask$="02"  
PROPERTY CreateAccess   * Read Only *
PROPERTY ModifyAccess   * Read Only *
PROPERTY DeleteAccess   * Read Only *
PROPERTY PrintAccess   * Read Only *
PROPERTY UpdateAccess   * Read Only *
PROPERTY ReadAccess   * Read Only *
PROPERTY TaskName$   * Read Only *
PROPERTY RoleList$   * Read Only *
PROPERTY SecurityAccess   * Read Only *
PROPERTY TaskType$   * Read Only *

Methods

FUNCTION CanUserAccessTask(task$, user$, company$, accessLevel)  
FUNCTION CanUserAccessTask(task$, user$, company$)  

This function will return a TRUE or FALSE on whether the given user for the given company can access the given task.

ParameterDescription
task$ [input, string] The task key of a task to be determined if the user has access to within the given company
user$ [input, string] The user key, if none given the active user will be used.
company$ [input, string] The company key, if none given the active company will be used.
accessLevel [output, numeric] Value of effective security access level. 1 = read, 2 = create, 4 = modify, 8 = full, etc.
Returns [boolean] retSUCCESS (1) - If user can access the task for the current company, retFAILURE (0) - If use cannot access the task for the current company, -99 if the user has no valid Roles
FUNCTION CheckOverridePassword(rndCode$, over$, rtn$)  
FUNCTION CheckSecurityEvent(event$)  
FUNCTION CheckSecurityEvent(event$, userCode$)  
FUNCTION CheckSecurityEvent(event$, userLogon$, password$)  
FUNCTION CheckSecurityEvent(event$, userLogon$, password$, modCode$)  
FUNCTION CloseFileForRebuild()  
FUNCTION GetOverrideRandomCode$()  
FUNCTION GetUserAccessList(user$, company$, taskList$, listType)  
FUNCTION GetUserAccessList(user$, company$, taskList$, listType, outputType)  

Generate a list of task Id's the user is able to access from the menu based on roles. This list can either be a list of disabled functions, enabled functions, or both with a flag to indicate whether accessible or not. Output can either be a comma separated list, or a windows message queue request.

ParameterDescription
user$ [input, string] Valid Sage 100 user code to be used to check permissions. If not provided, will use the user for the session.
company$ [input, string] Company code. If not provided, will use the company for the session.
taskList$ [output, string] Comma-separated list of task Id's
listType [input, integer] Integer indicator of what is to be output. 0 - ONLY Tasks not allowed, 1 - ONLY Tasks allowed, 2 - Both allowed and disallowed tasks with a format of TaskID + "=" + 1 or 0
outputType {optional} [input, integer] Integer indicator of the type of output. 0 - List to be returned in list$ argument, 1 - list$ meant to be consumed by desktop launcher
Returns [boolean] 0 - Failure, 1 - Success
FUNCTION GetUserCompanies$(user$, companyCode$, externalAccess)  
FUNCTION GetUserCompanies$(user$, companyCode$)  
FUNCTION GetUserCompanies$(user$)  

Generate a list of companies that a user has at least one active role assigned.

ParameterDescription
user$ [input, string] Valid Sage 100 user login name.
companyCode$ [input, string] Optional company code. Default is all companies.
externalAccess [input, bool] Optional flag to restrict search to only include companies that allow external access.
Returns [string] A SEP separated list of items containing userkey + ; + companykey
FUNCTION GetUserCompanyAccess$(user$, taskList$, companyCode$, externalAccess)  
FUNCTION GetUserCompanyAccess$(user$, taskList$, companyCode$)  
FUNCTION GetUserCompanyAccess$(user$, taskList$)  

For each task in a given list, return the list of companies which the user is allowed to access the task in.

ParameterDescription
user$ [input, string] Valid Sage 100 user login name.
taskList$ [input, string] Comma delimited List of task names.
companyCode$ [input, string] Optional company code. Default is all companies.
externalAccess [input, bool] Optional flag to restrict search to only include companies that allow external access.
Returns [string] A SEP separated list of items containing the taskName + ":" + a comma delimited list of company codes.
FUNCTION IsMember(roleName$)  
FUNCTION SetToReadOnly()  
FUNCTION LOCAL PERFORM CheckExcludeFlag()  
FUNCTION LOCAL GetSecurityEventDescription$(taskKey$)  
FUNCTION LOCAL GetSecurityType$(taskKey$)  
FUNCTION LOCAL GetTaskKey$(programName$)  
FUNCTION LOCAL GetTaskKey$(programName$, type$)  
FUNCTION LOCAL GetTaskKey$(programName$, type$, exclude$)  
FUNCTION LOCAL GetTaskModule$(taskKey$)  
FUNCTION LOCAL GetTasksFromRole(findRole$, findTask$)  
FUNCTION LOCAL GetUserRoles(user$, company$, roleKeys$)  

Returns a list of role keys that a specified user/company combination belongs to

ParameterDescription
user$ [input, string] This must be the userkey for the user to compile the list of valid roles for
company$ [input, string] This must be the companykey for the context in which to compile the list of valid roles for.
roleKeys$ [output, string] This will be a comma separated list of role keys that the user belongs to for the specified user/company combination. This will take into consideration the start and end dates that may be used for the role.
Returns 0 for failure and 1 for success
FUNCTION LOCAL LogSecurityEventOverride(taskKey$, overrideUser$, result)  
FUNCTION LOCAL LookupRoles(findTask$)  
FUNCTION LOCAL LookupRoles(findTask$, event)  
FUNCTION LOCAL LookupRoles(findTask$, event, user$)  
FUNCTION LOCAL PERFORM SearchUserSecurity()  

Properties inherited from: SY_Constant

retFAILURE, retSUCCESS, retNEW, retWARNING, retCANCEL, retYES, retNO, msgYES$, msgNO$, msgCANCEL$, msgOK$, msgRETRY$, msgABORT$, msgIGNORE$, msgNOTONFILE$, msgTIMEOUT$, msgDISABLE, msgACTIVE, msgLinkHELP$, msgLinkMSG$, isFALSE, isTRUE, isYES$, isNO$, isBUSY$, edtNONE, edtEXISTS, edtNEW, ctlDISABLE, ctlENABLE, ctlSHOW, ctlHIDE, ctlLOCK, ctlUNLOCK, ctlLOCKORDISABLE, ctlUNLOCKORENABLE, popHIDE, popDISABLE, popSHOW, popSHOWCHECKED, grdMODEVIEW, grdMODEMAINT, grdMODEADD, filCREATE, filLOCK, filCREATELOCK, filGLOBAL, filCREATEGLOBAL, filLOCKGLOBAL, filCREATELOCKGLOBAL, filCHANNEL, filRAW, filPURGE, filLOAD, filINPUT, filNOOBJECT, filPVX, filREFRESH, filPVX4$, filPVX5$, pthCOMPANY$, pthOTHERCOMPANY$, pthPRCOMPANY$, pthOTHERPRCOMPANY$, pthSYSTEM$, pthUSER$, pthSOA$, pthHOME$, pthROOT$, pthDICTIONARY$, pthTEXTOUT$, pthLOCK$, pthLOCKSYS$, pthPREFIX$, pthARCHIVE$, pthLOGFILES$, folderCOMMONPROGRAMFILES, folderCOMMONAPPLICATIONDATA, errOBJECT, errSYSTEMLOCK, errCONTINUE, errEMBEDDEDIO, errSYSLOCK, extSQLCREATETABLE$, extSQLALLOWNULLDATES$, dbALL$, dbNONE$, dateTOSTRINGFORMAT$, dateLONGMASK$, dateSHORTFMT, dateLONGFMT, dateYEARFIRST, dateMONTHFIRST, dateDAYFIRST, timeMINUTESMASK$, timeMINUTES24MASK$, timeSECONDSMASK$, timeSECONDS24MASK$, idxPRIMARY$, idxBATCH$, idxDISPLAY$, dirFIRST, dirLAST, dirNEXT, dirPREVIOUS, typALPHANUM, typZEROFILL, typCHARNUM, typMASTERNUM, typALPHANUMNF, typMASTERNUMC, typALPHA$, typNUMBERS$, typALPHANUM$, typALPHANUMNF$, typCHARNUM$, typMASTERNUM$, typMASTERNUMCLEN, modTASKOTFDISALLOW$, logALLACTIVITY$, logACTIVITY$, logERROR$, logACTNEWCUSTOMER$, logACTDATASYNC$, logACTDATAIMPORT$, logACTOPTIONCHANGED$, logACTPROGRAMLAUNCH$, logDFDM$, logSECURITY$, logTASKSCHEDULER$, logWEBERROR$, logVISUALINTEGRATOR$, logEntryIDLength, chkOFF$, chkON$, chkGRAYED$, secVIEWONLY, secCREATEONLY, secMODIFYONLY, secCREATEMODIFY, secDELETEONLY, secCREATEDELETE, secMODIFYDELETE, secFULLACCESS, secDEFAULTUSER$, secDEFAULTROLE$, regHKEY_CLASSES_ROOT, regHKEY_CURRENT_USER, regHKEY_LOCAL_MACHINE, regHKEY_USERS, regHKEY_CURRENT_CONFIG, regODBC_PATH$, regMAS_PATH$, E3_MYHANDLE, E3_TASK, E3_QUIT, E3_COCHANGE, E3_DATECHANGE, E3_USERCHANGE, E3_SRVRPATH, E3_HELPFILE, E3_TECHSUPPORT, E3_QUERYTOQUIT, E3_SUPERVISOR, E3_CUSTOMIZE, E3_SWITCHMODULE, E3_DISABLEWIN, E3_CURSOR, E3_USERID, E3_PRIVATETASK, E3_CHAT, E3_BROADCAST, E3_RELOAD, E3_PASSTHROUGH, E3_EXECUTE, E3_EXPCOCHANGE, E3_EXPTASK, E3_EXPLAUNCH, E3_SILENT, E3_DIRECT, E3_NODELIST, E3_OCXITEM, E3_MODULEID, E3_CUSTFAV, E3_HOMEPAGE, E3_MINIMIZE, E3_UNDOCKED, E3_DOCKED, E3_PUBLICTASK, E3_LAUNCHURL, E3_BTNCHANGE, E3_STDBTNRELOAD, E3_MYBUSINESS, E3_REGLOADED, E3_LOADED, E3_V4TASK, E3_PUBMODIFY, E3_TASKRELOAD, E3_SETAUTOHIDE, E3_COCHANGE2, E3_TASK_NC, E3_V4TASK_NC, E3_TASK_ALTC, E3_V4TASK_ALTC, E3_PASSWORD, E3_LAUNCHVIEW, E3_LAUNCHBIETASK, E3_CLEANUPBIE, E3_STARTVIEW, E3_BIE_ADMIN, E3_HELPPATH, E3_CUSTOMERID, E3_MASVERSION, E3_LAUNCHEMBEDDED, E3_LAUNCHERMENU, E3_APP_POINTSIZE, E3_LAUNCHERVERSION, E3_DISABLE, E3_ENABLE, E3_SHOW, E3_HIDE, E3_REFRESH, E3_LIBMASTER, WM_COPY, wtsINITIALPROGRAM, wtsAPPLICATIONNAME, wtsWORKINGDIRECTORY, wtsOEMID, wtsSESSIONID, wtsUSERNAME, wtsWINSTATIONNAME, wtsDOMAINNAME, wtsCONNECTSTATE, wtsCLIENTBUILDNUMBER, wtsCLIENTNAME, wtsCLIENTDIRECTORY, wtsCLIENTPRODUCTID, wtsCLIENTHARDWAREID, wtsCLIENTADDRESS, wtsCLIENTDISPLAY, wtsCLIENTPROTOCOLTYPE, thmNORMAL, thmMETAL, thmOLIVE, rptREPORTTYPESTD, rptREPORTTYPELABEL, rptREPORTTYPEMULTCOL, rptISTRUE, rptISFALSE, rptISDEFAULT, rptPORTRAIT, rptLANDSCAPE, rptASCENDING, rptDESCENDING, rptRIGHTALIGN, rptLEFTALIGN, rptHORCENTERALIGN, rptLSSINGLELINE, rptSTSUM, rptSTAVERAGE, rptSTCOUNT, rptDFLTHSPACING, rptDFLTVSPACING, rptDFLTFONTSIZE, rptDFLTLEFT, rptDFLTTOP, rptTWIPSPERCHARW, rptTWIPSPERCHARH, rptSVTREPORTTITLE, rptEDTDISKFILE, rptGCANYVALUE, rptGCDAILY, rptCRDATEFIELD, rptCRDATETIMEFIELD, crEFTCrystalReport, crEFTRichText, crEFTWordForWindows, crEFTExcel, crEFTPortableDocFormat, crEFTHTML32, crEFTHTML40, crEFTExcelRecord, crEFTText, crEFTCharacterSeparatedValues, crEFTTabSeparatedText, crEFTEditableRTF, crEFTXml, crEFTRPTR, crEFTExcelWorkbook, cContextKeyLen1, cContextKeyLen2, cContextKeyLen3, adCmdText, adCmdStoredProc, adClipString, adExecuteNoRecords, adVarChar, adInteger, adParamInput, adParamOutput, adParamInputOutput, adParamReturnValue, adTextNoRecords, adOpenForwardOnly, adOpenStatic, adLockReadOnly, adUseServer, adUseClient, dbTMP$, dbTEMPDB$, dbSYSDB$, dbPVXDDF, dbPVXDB, dbMYSQL, dbADO, dbSQL, LastErrorMsg$, LastErrorNum$, SageCloudAppDesc$, IolNomads$

Properties inherited from: SY_OpenObject

cLockInfoNOKEY$

Methods inherited from: SY_Constant

GetNOMADSIolist$(), MaskString(), RawString(), ClassValidateEMailAddress(), dateTODAY$(), Element$(), fmtMODCODE$(), fmtMODPREFIX$(), PERFORM FunctionBreak(), GetExceptionMsg$(), GetFileName(), GetJobTitles(), GetPrinterProps(), GetRecordCount(), isALPHA(), isDATE(), isNUMERIC(), MsgPath$(), ParseString(), ParseTagField(), Position(), QUO$(), ValidateFormatType()

Methods inherited from: SY_OpenObject

CheckWhoHasLock(), CreateLockInfo(), RemoveLockInfo(), OpenTable(), OpenTempFile()