PMCORE-2351 Advanced LDAP Improvements RM PMCORE-1299

This commit is contained in:
Roly Rudy Gutierrez Pinto
2020-12-11 15:22:55 -04:00
parent 9c1f954cfd
commit 1091a7eddb
27 changed files with 19917 additions and 153 deletions

View File

@@ -73,6 +73,11 @@ task :build => [:required] do
system "cp -Rf #{Dir.pwd}/vendor/colosa/taskscheduler/taskscheduler #{targetDir}/taskscheduler"
system "cp #{Dir.pwd}/vendor/colosa/taskscheduler/public/index.html #{targetDir}/taskscheduler"
puts "\n\n"
puts "Building: Authentication Sources".cyan
system "npm install --loglevel=error --prefix #{Dir.pwd}/workflow/engine/methods/authenticationSources"
system "npm run build --prefix #{Dir.pwd}/workflow/engine/methods/authenticationSources"
hashVendors = pmuiHash+"-"+mafeHash
## Building minified JS Files
puts "Building file: " + "/js/mafe-#{hashVendors}.js".cyan

View File

@@ -57132,6 +57132,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_ADDITIONAL_FILTER','en','Additional Filter','2014-01-15') ,
( 'LABEL','ID_ADDITIONAL_TABLES','en','PM Tables','2014-01-15') ,
( 'LABEL','ID_ADDRESS','en','Address','2014-01-15') ,
( 'LABEL','ID_ADD_ATTRIBUTE','en','Add Attribute','2020-12-10') ,
( 'LABEL','ID_ADD_CUSTOM_COLUMN','en','Add Custom Column','2014-01-15') ,
( 'LABEL','ID_ADD_DATA_PMTABLE','en','Add Data to PM table','2014-10-10') ,
( 'LABEL','ID_ADD_FIELD','en','Add field','2014-01-15') ,
@@ -57193,6 +57194,8 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_APP_MSG_BODY','en','Body','2014-01-15') ,
( 'LABEL','ID_APP_UID','en','App Uid','2015-09-15') ,
( 'LABEL','ID_ARE_YOU_SURE_RESEND','en','Are you sure that you want to resend this message','2014-01-15') ,
( 'LABEL','ID_ARE_YOU_SURE_TO_DELETE_ATTRIBUTE_PLEASE_CONFIRM','en','Are you sure to delete the matched attribute "{0}", please confirm?','2020-12-10') ,
( 'LABEL','ID_ARE_YOU_SURE_TO_DELETE_CONNECTION_PLEASE_CONFIRM','en','Are you sure to delete the connection "{0}", please confirm?','2020-12-10') ,
( 'LABEL','ID_ARRAY_VARIABLES_EMPTY','en','Array of variables is empty','2014-01-15') ,
( 'LABEL','ID_ASSIGN','en','Assign','2014-01-15') ,
( 'LABEL','ID_ASSIGNED_FIEDS','en','ASSIGNED FIELDS','2014-01-15') ,
@@ -57521,6 +57524,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_CHECK_PORT_FAILED','en','Error Testing Connection: Checking port failed','2015-09-18') ,
( 'LABEL','ID_CHECK_UPDATES','en','Check for updates (you need to be connected to the Internet)','2017-02-21') ,
( 'LABEL','ID_CHECK_WORKSPACE_CONFIGURATION','en','Check Workspace Configuration','2014-01-15') ,
( 'LABEL','ID_CHOOSE_A_FILE_OR_DROP_IT_HERE','en','Choose a file or drop it here...','2020-12-10') ,
( 'LABEL','ID_CHOOSE_OPTION','en','Choose an option','2014-01-15') ,
( 'LABEL','ID_CHOOSE_PROVIDER','en','Please select provider','2014-08-27') ,
( 'LABEL','ID_CHOOSE_TIME','en','Choose a time','2014-08-27') ,
@@ -57601,6 +57605,8 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_CONNECTION_ERROR','en','Connection Error: {0}','2014-01-15') ,
( 'LABEL','ID_CONNECTION_ERROR_PRIVILEGE','en','Connection Error: User "{0}" can''t create databases and users. <br>Please, provide a user with SUPER privileges.','2015-01-16') ,
( 'LABEL','ID_CONNECTION_ERROR_SECURITYADMIN','en','Connection Error: User "{0}" can''t create databases and Users <br>Please provide an user with sysadmin role or dbcreator and securityadmin roles.','2014-01-15') ,
( 'LABEL','ID_CONNECTION_SETTINGS','en','Connection Settings','2020-12-10') ,
( 'LABEL','ID_CONNECTION_WITH_THE_SAME_NAME_PLEASE_SELECT_AN_OPTION','en','You are about importing a connection with the same name "{0}" please select an option','2020-12-10') ,
( 'LABEL','ID_CONNECT_HOST','en','Trying to connect to host','2014-01-15') ,
( 'LABEL','ID_CONNECT_TO_SERVER','en','Connected to server {0} :{1} using user: ''{2}''','2014-01-15') ,
( 'LABEL','ID_CONSOLIDATED_CASE_LIST','en','Consolidated Case List','2015-03-24') ,
@@ -57790,6 +57796,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_DELETE_ACTION','en','Delete case','2020-01-15') ,
( 'LABEL','ID_DELETE_ALL_FIELDS','en','Do you want to delete all fields?','2014-01-15') ,
( 'LABEL','ID_DELETE_ALL_REPORT_TABLE','en','Do you want to delete all report tables?','2014-01-15') ,
( 'LABEL','ID_DELETE_ATTRIBUTE','en','Delete Attribute','2020-12-10') ,
( 'LABEL','ID_DELETE_AUTH_SOURCE','en','Delete Authentication Source','2014-10-13') ,
( 'LABEL','ID_DELETE_CALENDAR','en','Delete Calendar','2014-10-10') ,
( 'LABEL','ID_DELETE_CASES','en','Delete Cases','2016-03-02') ,
@@ -57835,6 +57842,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_DELETE_ROUTES','en','Delete Routes','2015-02-20') ,
( 'LABEL','ID_DELETE_SELECTED_ITEMS','en','Do you want to deleted selected({0}) items?','2014-01-15') ,
( 'LABEL','ID_DELETE_SELECTED_LOGO','en','Do you want to delete the selected logo?','2014-01-15') ,
( 'LABEL','ID_DELETE_SETTINGS','en','Delete Settings','2020-12-10') ,
( 'LABEL','ID_DELETE_SKIN','en','Delete Skin','2014-10-10') ,
( 'LABEL','ID_DELETE_SUB_PROCESS','en','Delete Sub-Process','2015-02-24') ,
( 'LABEL','ID_DELETE_SUPERVISOR','en','You cannot unassign the supervisor','2014-01-15') ,
@@ -57858,6 +57866,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_DEPARTMENTS_SYNCHRONIZE','en','Synchronize Departments','2014-01-15') ,
( 'LABEL','ID_DEPARTMENTS_USERS','en','Departments','2014-01-15') ,
( 'LABEL','ID_DEPARTMENT_CHECK_PARENT_DEPARTMENT','en','It''s necessary to check the parent-department: {0} for the sub-department: {1}','2016-07-05') ,
( 'LABEL','ID_DEPARTMENT_CLASS_IDENTIFIER','en','Department Class Identifier','2020-12-10') ,
( 'LABEL','ID_DEPARTMENT_CREATED_SUCCESSFULLY','en','{DEPARTMENT_NAME}, {PARENT_UID} Department {DEPARTMENT_NAME} created successfully','2014-01-15') ,
( 'LABEL','ID_DEPARTMENT_ERROR_CREATE','en','Error creating department','2016-07-05') ,
( 'LABEL','ID_DEPARTMENT_EXISTS','en','Department name already exists.','2014-01-15') ,
@@ -57935,10 +57944,12 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_DOWNLOADING_FILE','en','Downloading file','2014-01-15') ,
( 'LABEL','ID_DOWNLOADING_UPGRADE','en','Downloading upgrade:','2014-09-18') ,
( 'LABEL','ID_DOWNLOAD_MANUALLY','en','You can download it manually here','2014-09-18') ,
( 'LABEL','ID_DOWNLOAD_SETTINGS','en','Download Settings','2020-12-10') ,
( 'LABEL','ID_DOWN_TRIGGER','en','Down Trigger','2015-02-20') ,
( 'LABEL','ID_DRAFT','en','Draft','2014-01-15') ,
( 'LABEL','ID_DRIVE_HELP_ENABLE','en','When this option is enabled, all input, output and attached documents generated in your processes can be stored in Google Drive.','2016-01-05') ,
( 'LABEL','ID_DROP_DATABASE_EXISTS','en','Drop database if exists','2014-01-15') ,
( 'LABEL','ID_DROP_FILE_HERE','en','Drop file here...','2020-12-10') ,
( 'LABEL','ID_DUE_DATE','en','Due Date','2014-01-15') ,
( 'LABEL','ID_DUPLICATE_CASE_SCHEDULER_NAME','en','Duplicate Case Scheduler name.','2014-01-15') ,
( 'LABEL','ID_DUPLICATE_CATEGORY_NAME','en','Duplicate category name.','2014-01-15') ,
@@ -57976,6 +57987,8 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_EDIT','en','Edit','2014-01-15') ,
( 'LABEL','ID_EDITING_DYNAFORM','en','Editing the dynaform','2014-01-15') ,
( 'LABEL','ID_EDIT_ACTION','en','Edit Action','2014-01-15') ,
( 'LABEL','ID_EDIT_ATTRIBUTE','en','Edit Attribute','2020-12-10') ,
( 'LABEL','ID_EDIT_AUTHENTICATION_SOURCES','en','Edit Authentication Sources','2020-12-10') ,
( 'LABEL','ID_EDIT_BPMN','en','Edit BPMN','2014-01-15') ,
( 'LABEL','ID_EDIT_CATEGORY','en','Edit Process Category','2014-01-15') ,
( 'LABEL','ID_EDIT_CONDITIONS_OF_STEP','en','Edit step conditions','2014-01-15') ,
@@ -57992,6 +58005,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_EDIT_PROCESS','en','Process Edited','2015-02-21') ,
( 'LABEL','ID_EDIT_REPORT_TABLE','en','Edit Report Table','2014-01-15') ,
( 'LABEL','ID_EDIT_ROLE_TITLE','en','Edit Role','2014-01-15') ,
( 'LABEL','ID_EDIT_SETTINGS','en','Edit Settings','2020-12-10') ,
( 'LABEL','ID_EDIT_TRIGGERS','en','Edit Trigger','2014-01-15') ,
( 'LABEL','ID_EDIT_USERS','en','Edit Users','2014-01-15') ,
( 'LABEL','ID_EDIT_VIEW_USER_GROUP','en','View user groups','2014-01-15') ,
@@ -58374,8 +58388,10 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_GROUPS_SYNCHRONIZE','en','Synchronize Groups','2014-01-15') ,
( 'LABEL','ID_GROUP_CANNOT_DELETE_WHILE_ASSIGNED_TO_TASK','en','Group cannot be deleted while it''s assigned to a task','2014-04-03') ,
( 'LABEL','ID_GROUP_CHART','en','Group Chart','2014-01-15') ,
( 'LABEL','ID_GROUP_CLASS_IDENTIFIER','en','Group Class Identifier','2020-12-10') ,
( 'LABEL','ID_GROUP_CREATED_SUCCESSFULLY','en','Group {GROUP_NAME} created successfully','2014-01-15') ,
( 'LABEL','ID_GROUP_DOES_NOT_EXIST','en','The group with {0}: {1} does not exist.','2014-05-20') ,
( 'LABEL','ID_GROUP_IDENTIFIER','en','Group Identifier','2020-12-10') ,
( 'LABEL','ID_GROUP_INACTIVE','en','Group inactive','2014-01-15') ,
( 'LABEL','ID_GROUP_NAME','en','Group Name','2014-01-15') ,
( 'LABEL','ID_GROUP_NAME_REQUIRED','en','Group name is required','2014-01-15') ;
@@ -58456,6 +58472,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_IMPORT_ALREADY_EXISTS_BPMN','en','A process with the same name already exists!. Do you want to overwrite the existing process or you want to create a new process?.','2015-02-20') ,
( 'LABEL','ID_IMPORT_ALREADY_EXISTS_BPMN_NOTE','en','Note that your changes will be lost in your existing process if you overwrite it.','2015-02-20') ,
( 'LABEL','ID_IMPORT_BPMN','en','Import BPMN','2015-02-20') ,
( 'LABEL','ID_IMPORT_CONNECTION','en','Import connection','2020-12-10') ,
( 'LABEL','ID_IMPORT_CSV','en','CSV Import','2014-01-15') ,
( 'LABEL','ID_IMPORT_DATA_CSV','en','Import Data from CSV file','2014-01-15') ,
( 'LABEL','ID_IMPORT_LICENSE','en','Import license','2014-09-18') ,
@@ -58466,11 +58483,13 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_IMPORT_RT','en','Import Report Table','2014-01-15') ;
INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE ) VALUES
( 'LABEL','ID_IMPORT_SETTINGS','en','Import Settings','2020-12-10') ,
( 'LABEL','ID_IMPORT_SKIN','en','Import Skin','2014-10-10') ,
( 'LABEL','ID_IMPORT_TABLE','en','Import Table','2014-10-10') ,
( 'LABEL','ID_IMPORT_USERS','en','Import Users','2014-01-15') ,
( 'LABEL','ID_IN','en','in','2014-01-15') ,
( 'LABEL','ID_INACTIVE','en','Inactive','2014-01-15') ,
( 'LABEL','ID_INACTIVE_USERS','en','Inactive Users','2020-12-10') ,
( 'LABEL','ID_INBOX','en','Inbox','2014-01-15') ,
( 'LABEL','ID_INBOX_EMPTY','en','Your Inbox is empty...','2015-05-06') ,
( 'LABEL','ID_INCOMING_SERVER','en','Incoming Server','2018-11-23') ,
@@ -58634,6 +58653,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_LATEST_VERSION','en','Latest version','2014-09-18') ,
( 'LABEL','ID_LDAP_ACCOUNT_DISABLED','en','The account is currently disabled.','2020-10-02') ,
( 'LABEL','ID_LDAP_ACCOUNT_EXPIRED','en','The user''s account has expired.','2020-10-02') ,
( 'LABEL','ID_LDAP_ATTRIBUTE','en','LDAP Attribute','2020-12-10') ,
( 'LABEL','ID_LDAP_ERROR_CONNECTION','en','Error connection.','2020-10-02') ,
( 'LABEL','ID_LDAP_FIELD','en','LDAP Field','2015-09-15') ,
( 'LABEL','ID_LDAP_NOT_PERMITTED_TO_LOGON_AT_THIS_TIME','en','The user is not permitted to log on at this time.','2020-10-02') ,
@@ -59974,6 +59994,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_MAP_TYPE','en','Map Type','2014-01-15') ,
( 'LABEL','ID_MARKET_SERVER_CONTACTING','en','There was a problem contacting the market server.','2014-09-18') ,
( 'LABEL','ID_MASKS_LIST','en','Masks List','2014-01-15') ,
( 'LABEL','ID_MATCH_ATTRIBUTES','en','Match Attributes','2020-12-10') ,
( 'LABEL','ID_MATCH_ATTRIBUTES_TO_SYNC','en','Match attributes to sync','2015-09-15') ,
( 'LABEL','ID_MAXIMUM_SIZE_FILE_REQUIRED','en','The file maximum size is required!','2015-01-16') ,
( 'LABEL','ID_MAX_FILE_SIZE','en','Maximum upload file size','2014-01-15') ,
@@ -60144,6 +60165,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_NEED_REGISTER','en','You need to be registered to download this process. Register NOW!','2014-01-15') ,
( 'LABEL','ID_NEW','en','New','2014-01-15') ,
( 'LABEL','ID_NEW_ADD_TABLE','en','New PM Table','2014-01-15') ,
( 'LABEL','ID_NEW_AUTHENTICATION_SOURCES','en','New Authentication Sources','2020-12-10') ,
( 'LABEL','ID_NEW_BPMN_PROJECT','en','New BPMN Project','2015-08-18') ,
( 'LABEL','ID_NEW_CASE','en','New case','2014-01-15') ,
( 'LABEL','ID_NEW_CASES','en','% New Cases','2015-04-06') ,
@@ -60151,12 +60173,14 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_NEW_CASE_SCHEDULER','en','New Case Scheduler','2014-01-15') ,
( 'LABEL','ID_NEW_CATEGORY','en','Create New Category','2014-01-15') ,
( 'LABEL','ID_NEW_CONDITION_FROM_STEP','en','New Condition From Step','2015-02-20') ,
( 'LABEL','ID_NEW_CONNECTION','en','New connection','2020-12-10') ,
( 'LABEL','ID_NEW_DEPARTMENT','en','New','2014-01-15') ,
( 'LABEL','ID_NEW_DYNAFORM','en','New DynaForm.','2015-01-16') ,
( 'LABEL','ID_NEW_EVENT','en','New Event','2014-01-15') ,
( 'LABEL','ID_NEW_FOLDER','en','New Folder','2014-01-15') ,
( 'LABEL','ID_NEW_GROUP','en','New','2014-01-15') ,
( 'LABEL','ID_NEW_INPUTDOCS','en','New Input Document','2014-01-15') ,
( 'LABEL','ID_NEW_MATCHED_ATTRIBUTE','en','New Matched Attribute','2020-12-10') ,
( 'LABEL','ID_NEW_NOTE','en','New Note','2014-01-15') ,
( 'LABEL','ID_NEW_PASSWORD','en','New Password','2014-01-15') ,
( 'LABEL','ID_NEW_PASSWORD_SENT','en','Your new password was sent to your email account!','2014-01-15') ,
@@ -60234,6 +60258,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_NO_ITEMS_SELECTED','en','No item selected.','2015-01-16') ,
( 'LABEL','ID_NO_LICENSE_FEATURE_ENABLED','en','Your license does not have the Gmail integration. Please contact your administrator.','2015-09-17') ,
( 'LABEL','ID_NO_MANAGER_SELECTED','en','No Manager Selected','2014-01-15') ,
( 'LABEL','ID_NO_MATCHING_RECORDS','en','No matching records','2020-12-10') ,
( 'LABEL','ID_NO_MORE_APPLICATIONS','en','No more applications to show.','2014-01-15') ,
( 'LABEL','ID_NO_NEW_VERSIONS','en','No new versions available','2014-09-18') ,
( 'LABEL','ID_NO_OLDER_SESSION_FILES','en','There are no older session files','2014-01-15') ,
@@ -60281,6 +60306,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_OPEN_IN_POPUP','en','Open in a popup','2014-01-15') ,
( 'LABEL','ID_OPEN_WITH','en','Open With','2014-01-15') ,
( 'LABEL','ID_OPERATING_SYSTEM','en','Operating System','2014-01-15') ,
( 'LABEL','ID_OPERATOR','en','Operator','2020-12-10') ,
( 'LABEL','ID_OPTION','en','Option','2014-01-15') ,
( 'LABEL','ID_OPTIONS','en','Options','2014-01-15') ,
( 'LABEL','ID_OPTIONS_MENU_TASK','en','Options Menu Task','2015-02-20') ,
@@ -60381,6 +60407,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_PIN','en','Pin','2015-05-08') ,
( 'LABEL','ID_PIN_INVALID','en','The PIN is invalid','2014-01-15') ,
( 'LABEL','ID_PLEASE','en','please','2014-01-15') ,
( 'LABEL','ID_PLEASE_ADD_THE_FILE_SETTINGS_TO_BE_UPLOADED','en','Please add the file settings to be uploaded','2020-12-10') ,
( 'LABEL','ID_PLEASE_CHANGE_PASSWORD_POLICY','en','Please change your password to one that complies with these policies.','2014-01-15') ,
( 'LABEL','ID_PLEASE_CONFIGURE_ESTIMATED_DURATION_TASK','en','Please, configure the estimated duration of the task.','2014-10-23') ,
( 'LABEL','ID_PLEASE_ENTER_COMMENTS','en','Please enter comments!','2014-01-15') ,
@@ -60542,6 +60569,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_PROCESSMAKER_SLOGAN1','en','This Business Process is Powered By ProcessMaker','2014-01-15') ,
( 'LABEL','ID_PROCESSMAKER_SUCCESS_INSTALLED','en','ProcessMaker was successfully installed<br/>Workspace <b>" {0} " </b> was installed correctly.','2014-01-15') ,
( 'LABEL','ID_PROCESSMAKER_UI_NOT_INSTALL','en','The new ProcessMaker UI couldn''t be applied on installation. You can enable it afterwards in ADMIN > Settings > System.','2015-01-16') ,
( 'LABEL','ID_PROCESSMAKER_USER_FIELD','en','ProcessMaker User Field','2020-12-10') ,
( 'LABEL','ID_PROCESSMAKER_VALIDATION','en','Please insert a valid processmaker user name and password, in order to assign the case to their respective owner.','2014-01-15') ,
( 'LABEL','ID_PROCESSMAKER_WRITE_CONFIG_INDEX','en','ProcessMaker couldn''t write on configuration file: {0}<br/>','2014-01-15') ,
( 'LABEL','ID_PROCESSMAP_CALENDAR_CONFIRM_DELETE','en','Are you sure you want to delete this calendar?','2014-01-15') ,
@@ -60740,6 +60768,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_REQUEST_ACTION_NOT_EXIST','en','The requested action does not exist','2014-01-15') ,
( 'LABEL','ID_REQUEST_DOCUMENTS','en','Input Documents','2014-01-15') ,
( 'LABEL','ID_REQUEST_SENT','en','Request sent.','2014-01-15') ,
( 'LABEL','ID_REQUIRE_SIGN_IN_POLICY_FOR_LDAP','en','Require sign-in policy for LDAP','2020-12-10') ,
( 'LABEL','ID_REQUIRED_FIELD','en','Required Field','2014-01-15') ,
( 'LABEL','ID_REQUIRED_FIELDS_ERROR','en','Some required fields were not filled','2014-01-15') ,
( 'LABEL','ID_REQUIRED_FIELDS_GRID','en','The marked fields in the form are required and/or have errors in their format. Please verify the fields before continuing.','2015-05-04') ,
@@ -60944,6 +60973,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_SHOW_DIRS','en','Show Dirs','2014-01-15') ,
( 'LABEL','ID_SHOW_HIDE_CASES_STEPS','en','Show or hide the Cases Steps','2014-01-15') ,
( 'LABEL','ID_SHOW_RETURN_ADVANCED_SEARCH','en','Return to Advanced Search','2017-07-23') ,
( 'LABEL','ID_SHOWING_FROM_RECORDS_COUNT','en','Showing {from} to {to} of {count} records|{count} records|One record','2020-12-10') ,
( 'LABEL','ID_SIGN_IN','en','Sign In','2014-01-15') ,
( 'LABEL','ID_SIGN_OUT','en','Sign out','2014-01-15') ,
( 'LABEL','ID_SIMPLE_REPORT','en','Simple Report','2014-01-15') ,
@@ -61081,6 +61111,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_SWITCH_EDITOR','en','Switch Editor','2014-01-15') ,
( 'LABEL','ID_SWITCH_INTERFACE','en','Switch Interface','2014-01-15') ,
( 'LABEL','ID_SYSTEM','en','System','2014-01-15') ,
( 'LABEL','ID_SYSTEM_ADMINISTRATOR','en','System Administrator','2020-12-10') ,
( 'LABEL','ID_SYSTEM_INFO','en','System information','2014-01-15') ,
( 'LABEL','ID_SYSTEM_REDIRECT_CONFIRM','en','You must login again to view the changes. Do you want do it now?','2015-01-16') ,
( 'LABEL','ID_SYSTEM_SETTINGS','en','System Settings','2014-01-15') ,
@@ -61346,6 +61377,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_UPDATE_OUTPUT_DOCUMENT','en','Update Output Document','2015-02-20') ,
( 'LABEL','ID_UPDATE_PMTABLE','en','Update PM Table','2014-10-10') ,
( 'LABEL','ID_UPDATE_ROLE','en','Update Role','2014-10-10') ,
( 'LABEL','ID_UPDATE_SETTINGS','en','Update Settings','2020-12-10') ,
( 'LABEL','ID_UPDATE_SUB_DEPARTAMENT','en','Update Sub Department','2014-10-21') ,
( 'LABEL','ID_UPDATE_TEXT','en','Edit Text','2015-02-20') ,
( 'LABEL','ID_UPDATE_TRIGGER','en','Update trigger','2015-02-20') ,
@@ -61371,6 +61403,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_UPLOADING_PROCESS_FILE','en','Uploading the process file...','2014-01-15') ,
( 'LABEL','ID_UPLOADING_TRANSLATION_FILE','en','Uploading the translation file...','2014-01-15') ,
( 'LABEL','ID_UPLOAD_COMPLETE','en','Upload complete','2014-01-15') ,
( 'LABEL','ID_UPLOAD_CONNECTION_SETTINGS','en','Upload Connection Settings','2020-12-10') ,
( 'LABEL','ID_UPLOAD_ERR_CANT_WRITE','en','Failed to write file to disk','2014-01-15') ,
( 'LABEL','ID_UPLOAD_ERR_EXTENSION','en','File upload stopped by extension','2014-01-15') ,
( 'LABEL','ID_UPLOAD_ERR_FORM_SIZE','en','The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form','2014-01-15') ,
@@ -61425,6 +61458,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_USER_CAN_NOT_BE_DELETED','en','The user with usr_uid: {0}, cannot be deleted while it has cases assigned.','2014-05-22') ,
( 'LABEL','ID_USER_CAN_NOT_UPDATE','en','This user: {0}, can not update the data.','2014-05-22') ,
( 'LABEL','ID_USER_CASES_NOT_START','en','User can''t start a case because doesn''t have a starting task assigned','2014-01-15') ,
( 'LABEL','ID_USER_CLASS_IDENTIFIER','en','User Class Identifier','2020-12-10') ,
( 'LABEL','ID_USER_CREATED_SUCCESSFULLY','en','User {FIRSTNAME} {LASTNAME} [{USER_ID}] created successfully','2014-01-15') ,
( 'LABEL','ID_USER_CREDENTIALS_REQUIRED','en','User credentials are required.','2014-01-15') ,
( 'LABEL','ID_USER_DEFINED_TIMING_CONTROL','en','Allow user defined timing control','2014-01-15') ,

File diff suppressed because it is too large Load Diff

View File

@@ -100,34 +100,65 @@ try {
global $RBAC;
$co = new Configurations();
$config = $co->getConfiguration( 'authSourcesList', 'pageSize', '', $_SESSION['USER_LOGGED'] );
$limit_size = isset( $config['pageSize'] ) ? $config['pageSize'] : 20;
$config = $co->getConfiguration('authSourcesList', 'pageSize', '', $_SESSION['USER_LOGGED']);
$limit_size = isset($config['pageSize']) ? $config['pageSize'] : 20;
$start = isset( $_REQUEST['start'] ) ? $_REQUEST['start'] : 0;
$limit = isset( $_REQUEST['limit'] ) ? $_REQUEST['limit'] : $limit_size;
$filter = isset( $_REQUEST['textFilter'] ) ? $_REQUEST['textFilter'] : '';
$start = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
$limit = isset($_REQUEST['limit']) ? $_REQUEST['limit'] : $limit_size;
$filter = isset($_REQUEST['textFilter']) ? $_REQUEST['textFilter'] : '';
$Criterias = $RBAC->getAuthenticationSources( $start, $limit, $filter );
$criterias = $RBAC->getAuthenticationSources($start, $limit, $filter);
$Dat = AuthenticationSourcePeer::doSelectRS( $Criterias['COUNTER'] );
$Dat->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$Dat->next();
$row = $Dat->getRow();
$dataSourceAuthentication = AuthenticationSourcePeer::doSelectRS($criterias['COUNTER']);
$dataSourceAuthentication->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataSourceAuthentication->next();
$row = $dataSourceAuthentication->getRow();
$total_sources = $row['CNT'];
$oDataset = AuthenticationSourcePeer::doSelectRS( $Criterias['LIST'] );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
if (!empty($_REQUEST['orderBy']) && isset($_REQUEST['ascending']) && defined("AuthenticationSourcePeer::" . $_REQUEST['orderBy'])) {
if ($_REQUEST['ascending'] === '1') {
$criterias['LIST']->addAscendingOrderByColumn(constant("AuthenticationSourcePeer::" . $_REQUEST['orderBy']));
}
if ($_REQUEST['ascending'] === '0') {
$criterias['LIST']->addDescendingOrderByColumn(constant("AuthenticationSourcePeer::" . $_REQUEST['orderBy']));
}
} else {
$criterias['LIST']->addAscendingOrderByColumn(AuthenticationSourcePeer::AUTH_SOURCE_NAME);
}
$dataset = AuthenticationSourcePeer::doSelectRS($criterias['LIST']);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
global $RBAC;
$auth = $RBAC->getAllUsersByAuthSource();
$aSources = Array ();
while ($oDataset->next()) {
$aSources[] = $oDataset->getRow();
$index = sizeof( $aSources ) - 1;
$aSources[$index]['CURRENT_USERS'] = isset( $auth[$aSources[$index]['AUTH_SOURCE_UID']] ) ? $auth[$aSources[$index]['AUTH_SOURCE_UID']] : 0;
$sources = [];
while ($dataset->next()) {
$row = $dataset->getRow();
$values = explode("_", $row["AUTH_SOURCE_PASSWORD"]);
foreach ($values as $value) {
if ($value == "2NnV3ujj3w") {
$row["AUTH_SOURCE_PASSWORD"] = G::decrypt($values[0], $row["AUTH_SOURCE_SERVER_NAME"]);
}
}
$label = G::LoadTranslation('ID_DISABLE');
if ($row['AUTH_SOURCE_ENABLED_TLS'] === "1") {
$label = G::LoadTranslation('ID_ENABLE');
}
$row['AUTH_SOURCE_ENABLED_TLS_LABEL'] = $label;
//additional information
$authSourceData = unserialize($row['AUTH_SOURCE_DATA']);
if (is_array($authSourceData)) {
$row = array_merge($row, $authSourceData);
}
$sources[] = $row;
$index = sizeof($sources) - 1;
$sources[$index]['CURRENT_USERS'] = isset($auth[$sources[$index]['AUTH_SOURCE_UID']]) ? $auth[$sources[$index]['AUTH_SOURCE_UID']] : 0;
}
echo '{sources: ' . G::json_encode( $aSources ) . ', total_sources: ' . $total_sources . '}';
$response = [
'sources' => $sources,
'total_sources' => $total_sources
];
echo G::json_encode($response);
break;
case 'canDeleteAuthSource':
try {

View File

@@ -1,5 +1,9 @@
<?php
use ProcessMaker\Model\RbacAuthenticationSource;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
$function = $_REQUEST['functionAccion'];
switch ($function) {
@@ -62,10 +66,10 @@ switch ($function) {
//Response
$response["status"] = "OK";
$response["existsRecords"] = ($flagUser || $flagDepartment || $flagGroup)? 1 : 0;
$response["existsRecords"] = ($flagUser || $flagDepartment || $flagGroup) ? 1 : 0;
} catch (Exception $e) {
//Response
$response["status"] = "ERROR";
$response["status"] = "ERROR";
$response["message"] = $e->getMessage();
}
@@ -93,7 +97,44 @@ switch ($function) {
default:
break;
}
echo G::json_encode(array('success'=> true, 'data' => $data, 'message'=>'Created Quote', 'total' => count($data)));
echo G::json_encode(array('success' => true, 'data' => $data, 'message' => 'Created Quote', 'total' => count($data)));
break;
case 'ldapVerifyName':
$authSourceName = empty($_REQUEST['AUTH_SOURCE_NAME']) ? '' : $_REQUEST['AUTH_SOURCE_NAME'];
$authenticationSource = RbacAuthenticationSource::query()
->select(['AUTH_SOURCE_UID', 'AUTH_SOURCE_NAME'])
->where('AUTH_SOURCE_NAME', '=', $authSourceName)
->get()
->first();
$row = false;
$suggestName = "";
if (!empty($authenticationSource)) {
$row = $authenticationSource;
$lastAuthenticationSource = RbacAuthenticationSource::query()
->select(['AUTH_SOURCE_NAME'])
->where('AUTH_SOURCE_NAME', 'LIKE', "%{$authSourceName}%")
->orderBy('AUTH_SOURCE_NAME', 'desc')
->get()
->first();
if (!empty($lastAuthenticationSource)) {
$name = $lastAuthenticationSource->AUTH_SOURCE_NAME;
//get suggest name
$pieces = explode(" ", $name);
$last = array_pop($pieces);
$number = trim($last, "()");
if ("({$number})" === $last) {
$number = intval($number) + 1;
$suggestName = implode("", $pieces) . " ({$number})";
} else {
$suggestName = $name . " (1)";
}
}
}
echo G::json_encode([
'success' => true,
'row' => $row,
'suggestName' => $suggestName
]);
break;
case 'ldapSave':
if (isset($_POST['AUTH_SOURCE_SHOWGRID-checkbox'])) {
@@ -102,7 +143,7 @@ switch ($function) {
$attributes = G::json_decode($_POST['AUTH_SOURCE_GRID_TEXT']);
$con = 1;
foreach ($attributes as $value) {
$_POST['AUTH_SOURCE_GRID_ATTRIBUTE'][$con] = (array)$value;
$_POST['AUTH_SOURCE_GRID_ATTRIBUTE'][$con] = (array) $value;
$con++;
}
}
@@ -133,11 +174,11 @@ switch ($function) {
unset($_POST['AUTH_SOURCE_GRID_TEXT']);
}
$aCommonFields = array ('AUTH_SOURCE_UID','AUTH_SOURCE_NAME','AUTH_SOURCE_PROVIDER','AUTH_SOURCE_SERVER_NAME','AUTH_SOURCE_PORT','AUTH_SOURCE_ENABLED_TLS','AUTH_ANONYMOUS','AUTH_SOURCE_SEARCH_USER','AUTH_SOURCE_PASSWORD','AUTH_SOURCE_VERSION','AUTH_SOURCE_BASE_DN','AUTH_SOURCE_OBJECT_CLASSES','AUTH_SOURCE_ATTRIBUTES');
$aCommonFields = array('AUTH_SOURCE_UID', 'AUTH_SOURCE_NAME', 'AUTH_SOURCE_PROVIDER', 'AUTH_SOURCE_SERVER_NAME', 'AUTH_SOURCE_PORT', 'AUTH_SOURCE_ENABLED_TLS', 'AUTH_ANONYMOUS', 'AUTH_SOURCE_SEARCH_USER', 'AUTH_SOURCE_PASSWORD', 'AUTH_SOURCE_VERSION', 'AUTH_SOURCE_BASE_DN', 'AUTH_SOURCE_OBJECT_CLASSES', 'AUTH_SOURCE_ATTRIBUTES');
$aFields = $aData = array ();
$aFields = $aData = array();
foreach ($_POST as $sField => $sValue) {
if (in_array( $sField, $aCommonFields )) {
if (in_array($sField, $aCommonFields)) {
$aFields[$sField] = $sValue;
} else {
$aData[$sField] = $sValue;
@@ -168,11 +209,11 @@ switch ($function) {
//Save
if ($aFields['AUTH_SOURCE_UID'] == '') {
$RBAC->createAuthSource( $aFields );
$RBAC->createAuthSource($aFields);
} else {
$RBAC->updateAuthSource( $aFields );
$RBAC->updateAuthSource($aFields);
}
echo G::json_encode(array('success'=> true));
echo G::json_encode(array('success' => true));
break;
case "searchUsers":
$response = array();
@@ -182,8 +223,8 @@ switch ($function) {
$authenticationSourceUid = $_POST["sUID"];
$keyword = $_POST["sKeyword"];
$start = (isset($_POST["start"]))? $_POST["start"]: 0;
$limit = (isset($_POST["limit"]))? $_POST["limit"]: $pageSize;
$start = (isset($_POST["start"])) ? $_POST["start"] : 0;
$limit = (isset($_POST["limit"])) ? $_POST["limit"] : $pageSize;
//Get Users from Database
$arrayUser = array();
@@ -217,7 +258,7 @@ switch ($function) {
if (!isset($arrayUser[strtolower($arrayUserData["sUsername"])])) {
$arrayUserData["STATUS"] = G::LoadTranslation("ID_NOT_IMPORTED");
$arrayUserData["IMPORT"] = 1;
} elseif($authenticationSourceUid === $arrayUser[strtolower($arrayUserData["sUsername"])]) {
} elseif ($authenticationSourceUid === $arrayUser[strtolower($arrayUserData["sUsername"])]) {
$arrayUserData["STATUS"] = G::LoadTranslation("ID_IMPORTED");
$arrayUserData["IMPORT"] = 0;
} else {
@@ -229,25 +270,25 @@ switch ($function) {
}
//Response
$response["status"] = "OK";
$response["status"] = "OK";
$response["success"] = true;
$response["resultTotal"] = $result["numRecTotal"];
$response["resultRoot"] = $arrayData;
$response["resultRoot"] = $arrayData;
} catch (Exception $e) {
//Response
$response["status"] = "ERROR";
$response["status"] = "ERROR";
$response["message"] = $e->getMessage();
}
echo G::json_encode($response);
break;
case 'importUsers':
$usersImport = $_REQUEST['UsersImport'];
$usersImport = $_REQUEST['UsersImport'];
$authSourceUid = $_REQUEST['AUTH_SOURCE_UID'];
$aUsers = G::json_decode($usersImport);
global $RBAC;
$aFields = $RBAC->getAuthSource( $authSourceUid );
$aFields = $RBAC->getAuthSource($authSourceUid);
$aAttributes = array();
if (isset($aFields['AUTH_SOURCE_DATA']['AUTH_SOURCE_GRID_ATTRIBUTE'])) {
@@ -258,46 +299,46 @@ switch ($function) {
$countUsers = 0;
//$usersImport
foreach ($aUsers as $sUser) {
$aUser = (array)$sUser;
$aUser = (array) $sUser;
$matches = array();
$aData = array();
$aData['USR_USERNAME'] = str_replace( "*", "'", $aUser['sUsername'] );
$aData = array();
$aData['USR_USERNAME'] = str_replace("*", "'", $aUser['sUsername']);
$aData["USR_PASSWORD"] = "00000000000000000000000000000000";
// note added by gustavo gustavo-at-colosa.com
// asign the FirstName and LastName variables
// add replace to change D*Souza to D'Souza by krlos
$aData['USR_FIRSTNAME'] = str_replace( "*", "'", $aUser['sFirstname'] );
$aData['USR_LASTNAME'] = str_replace( "*", "'", $aUser['sLastname'] );
$aData['USR_FIRSTNAME'] = str_replace("*", "'", $aUser['sFirstname']);
$aData['USR_LASTNAME'] = str_replace("*", "'", $aUser['sLastname']);
$aData['USR_EMAIL'] = $aUser['sEmail'];
$aData['USR_DUE_DATE'] = date( 'Y-m-d', mktime( 0, 0, 0, date( 'm' ), date( 'd' ), date( 'Y' ) + 2 ) );
$aData['USR_CREATE_DATE'] = date( 'Y-m-d H:i:s' );
$aData['USR_UPDATE_DATE'] = date( 'Y-m-d H:i:s' );
$aData['USR_BIRTHDAY'] = date( 'Y-m-d' );
$aData['USR_DUE_DATE'] = date('Y-m-d', mktime(0, 0, 0, date('m'), date('d'), date('Y') + 2));
$aData['USR_CREATE_DATE'] = date('Y-m-d H:i:s');
$aData['USR_UPDATE_DATE'] = date('Y-m-d H:i:s');
$aData['USR_BIRTHDAY'] = date('Y-m-d');
$aData['USR_STATUS'] = (isset($aUser['USR_STATUS'])) ? (($aUser['USR_STATUS'] == 'ACTIVE') ? 1 : 0) : 1;
$aData['USR_AUTH_TYPE'] = strtolower( $aFields['AUTH_SOURCE_PROVIDER'] );
$aData['USR_AUTH_TYPE'] = strtolower($aFields['AUTH_SOURCE_PROVIDER']);
$aData['UID_AUTH_SOURCE'] = $aFields['AUTH_SOURCE_UID'];
// validating with regexp if there are some missing * inside the DN string
// if it's so the is changed to the ' character
preg_match( '/[a-zA-Z]\*[a-zA-Z]/', $aUser['sDN'], $matches );
preg_match('/[a-zA-Z]\*[a-zA-Z]/', $aUser['sDN'], $matches);
foreach ($matches as $key => $match) {
$newMatch = str_replace( '*', '\'', $match );
$aUser['sDN'] = str_replace( $match, $newMatch, $aUser['sDN'] );
$newMatch = str_replace('*', '\'', $match);
$aUser['sDN'] = str_replace($match, $newMatch, $aUser['sDN']);
}
$aData['USR_AUTH_USER_DN'] = $aUser['sDN'];
try {
$sUserUID = $RBAC->createUser( $aData, 'PROCESSMAKER_OPERATOR', $aFields['AUTH_SOURCE_NAME']);
$usersCreated .= $aData['USR_USERNAME'].' ';
$countUsers ++;
$sUserUID = $RBAC->createUser($aData, 'PROCESSMAKER_OPERATOR', $aFields['AUTH_SOURCE_NAME']);
$usersCreated .= $aData['USR_USERNAME'] . ' ';
$countUsers++;
} catch (Exception $oError) {
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', array ('MESSAGE' => $oError->getMessage()) );
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', array('MESSAGE' => $oError->getMessage()));
G::RenderPage("publish", "blank");
die();
}
$aData['USR_STATUS'] = (isset($aUser['USR_STATUS'])) ? $aUser['USR_STATUS'] :'ACTIVE';
$aData['USR_STATUS'] = (isset($aUser['USR_STATUS'])) ? $aUser['USR_STATUS'] : 'ACTIVE';
$aData['USR_UID'] = $sUserUID;
$aData['USR_ROLE'] = 'PROCESSMAKER_OPERATOR';
@@ -307,7 +348,7 @@ switch ($function) {
if (count($aAttributes)) {
foreach ($aAttributes as $value) {
if (isset($aUser[$value['attributeUser']])) {
$aData[$value['attributeUser']] = str_replace( "*", "'", $aUser[$value['attributeUser']] );
$aData[$value['attributeUser']] = str_replace("*", "'", $aUser[$value['attributeUser']]);
if ($value['attributeUser'] == 'USR_STATUS') {
$evalValue = $aData[$value['attributeUser']];
$statusValue = $aData['USR_STATUS'];
@@ -317,7 +358,7 @@ switch ($function) {
}
}
$oUser = new Users();
$oUser->create( $aData );
$oUser->create($aData);
}
$sClassName = strtolower($aFields['AUTH_SOURCE_PROVIDER']);
@@ -334,7 +375,7 @@ switch ($function) {
$plugin->log($ldapcnn, "Users imported $countUsers: " . $usersCreated);
echo G::json_encode(array('success'=> true));
echo G::json_encode(array('success' => true));
break;
case "ldapTestConnection":
$response = array();
@@ -357,7 +398,7 @@ switch ($function) {
$response["status"] = "OK";
} catch (Exception $e) {
//Response
$response["status"] = "ERROR";
$response["status"] = "ERROR";
$response["message"] = $e->getMessage();
}

View File

@@ -0,0 +1,24 @@
.DS_Store
node_modules
/dist
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
/nbproject/private/

View File

@@ -0,0 +1,24 @@
# my-app
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).

View File

@@ -0,0 +1,5 @@
module.exports = {
presets: [
'@vue/cli-plugin-babel/preset'
]
}

View File

@@ -0,0 +1,13 @@
<?php
global $G_PUBLISH;
$G_PUBLISH = new Publisher();
try {
echo file_get_contents(PATH_HOME . "public_html/lib/authenticationSources/index.html");
} catch (Exception $e) {
$message = [
'MESSAGE' => $e->getMessage()
];
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', $message);
G::RenderPage('publish', 'blank');
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,51 @@
{
"name": "authenticationSources",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build --dest ../../../public_html/lib/authenticationSources",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@panter/vue-i18next": "^0.15.2",
"@vue/cli": "^4.4.6",
"axios": "^0.19.2",
"bootstrap": "^4.5.0",
"bootstrap-vue": "^2.15.0",
"core-js": "^3.6.5",
"lodash": "^4.17.19",
"save": "^2.4.0",
"vue": "^2.6.11",
"vue-tables-2": "^2.0.27",
"vuelidate": "^0.7.5"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^6.2.2",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View File

@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<script type="text/javascript" src="/js/ext/translation.en.js"></script>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

View File

@@ -0,0 +1,155 @@
<template>
<div id="app">
<authenticationSources ref="authenticationSources"
v-show="views.authenticationSources"
@newConnection="newConnection"
@editSettings="editSettings"
@optionSaveButton="optionSaveButton"
@optionUpdateButton="optionUpdateButton"
@optionNewButton="optionNewButton"/>
<newConnection ref="newConnection"
v-show="views.newConnection"
@matchAttributesToSync="matchAttributesToSync"
@save="saveNewConnection"
@cancel="showView('authenticationSources')"/>
<matchAttributes ref="matchAttributes"
v-show="views.matchAttributes"
@connectionSettings="connectionSettings"
@addAttribute="addAttribute"
@editAttribute="editAttribute"/>
<newMatchedAttribute ref="newMatchedAttribute"
v-show="views.newMatchedAttribute"
@save="saveNewMatchedAttribute"
@cancel="cancelNewMatchedAttribute"/>
</div>
</template>
<script>
import authenticationSources from './components/authenticationSources.vue'
import newConnection from './components/newConnection.vue'
import matchAttributes from './components/matchAttributes.vue'
import newMatchedAttribute from "./components/newMatchedAttribute.vue"
import axios from "axios"
export default {
name: 'app',
components: {
authenticationSources,
newConnection,
matchAttributes,
newMatchedAttribute
},
data() {
return {
views: {
authenticationSources: true,
newConnection: false,
matchAttributes: false,
newMatchedAttribute: false
},
selectedRow: null
};
},
methods: {
showView(name) {
for (let view in this.views) {
this.views[view] = false;
}
this.views[name] = true;
},
newConnection() {
this.$refs.newConnection.reset();
this.$refs.newConnection.setTitle(this.$root.translation('ID_NEW_AUTHENTICATION_SOURCES'));
this.showView('newConnection');
},
editSettings(row) {
this.selectedRow = row;
let form = this.$refs.newConnection.rowToForm(row);
this.$refs.newConnection.setTitle(this.$root.translation('ID_EDIT_AUTHENTICATION_SOURCES'));
this.$refs.newConnection.reset();
this.$refs.newConnection.load(form);
this.showView('newConnection');
},
optionSaveButton(row) {
row.AUTH_SOURCE_UID = "";
let form = this.$refs.newConnection.rowToForm(row);
this.$refs.newConnection.setTitle(this.$root.translation('ID_NEW_AUTHENTICATION_SOURCES'));
this.$refs.newConnection.reset();
this.$refs.newConnection.load(form);
this.showView('newConnection');
},
optionUpdateButton(row, rowResult) {
row.AUTH_SOURCE_UID = rowResult.AUTH_SOURCE_UID;
this.selectedRow = row;
let form = this.$refs.newConnection.rowToForm(row);
this.$refs.newConnection.setTitle(this.$root.translation('ID_EDIT_AUTHENTICATION_SOURCES'));
this.$refs.newConnection.reset();
this.$refs.newConnection.load(form);
this.showView('newConnection');
},
optionNewButton(row) {
row.AUTH_SOURCE_UID = "";
let form = this.$refs.newConnection.rowToForm(row);
this.$refs.newConnection.setTitle(this.$root.translation('ID_NEW_AUTHENTICATION_SOURCES'));
this.$refs.newConnection.reset();
this.$refs.newConnection.load(form);
this.showView('newConnection');
},
saveNewConnection(form) {
let formData = this.$refs.newConnection.formToFormData(form);
axios.post(this.$root.baseUrl() + "ldapAdvancedProxy.php?functionAccion=ldapSave", formData)
.then(response => {
response;
this.$refs.authenticationSources.refresh();
})
.catch(error => {
error;
})
.finally(() => {
});
this.showView('authenticationSources');
},
matchAttributesToSync() {
let gridText = this.$refs.newConnection.getGridText();
let rows = JSON.parse(gridText);
this.showView('matchAttributes');
this.$refs.matchAttributes.setRows(rows);
},
addAttribute() {
this.$refs.newMatchedAttribute.reset();
this.showView("newMatchedAttribute");
},
editAttribute(row, index) {
this.$refs.newMatchedAttribute.load(row, index);
this.showView("newMatchedAttribute");
},
saveNewMatchedAttribute(form) {
this.$refs.matchAttributes.saveRow(form);
this.showView('matchAttributes');
},
cancelNewMatchedAttribute() {
this.showView('matchAttributes');
},
connectionSettings(rows) {
let gridText = JSON.stringify(rows);
this.$refs.newConnection.setGridText(gridText);
this.showView('newConnection');
}
}
}
</script>
<style>
#app {
margin: 20px;
}
.custom-tooltip > .tooltip-inner{
max-width: none;
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View File

@@ -0,0 +1,279 @@
<template>
<div>
<titleSection :title="$root.translation('ID_AUTH_SOURCES')"></titleSection>
<b-form-group class="float-right">
<b-button variant="primary"
@click="$refs['as-b-modal-upload-file'].show();">
<b-icon icon="arrow-up-short" aria-hidden="true"/> {{$root.translation('ID_IMPORT_CONNECTION')}}
</b-button>&nbsp;
<b-button variant="success"
@click="$emit('newConnection')">
<b-icon icon="plus" aria-hidden="true"/> {{$root.translation('ID_NEW_CONNECTION')}}
</b-button>
</b-form-group>
<v-server-table ref="vServerTable1"
:url="baseUrl"
:columns="columns"
:options="options"
:data="tableData">
<div slot="icons"
slot-scope="props">
<b-button :id="'as-b-button-tooltip-'+props.index"
variant="light"
size="sm"
class="mb-2"
@mousedown="$root.$emit('bv::hide::tooltip');"
@mouseup="$root.$emit('bv::show::tooltip','as-b-button-tooltip-'+props.index);">
<b-icon icon="three-dots-vertical" aria-hidden="true"/>
</b-button>
<b-tooltip :target="'as-b-button-tooltip-'+props.index"
triggers="hover click focus"
custom-class="custom-tooltip"
placement="left"
variant="light">
<b-button-group>
<b-button @click="importUsers(props.row)"
v-b-tooltip.hover
:title="$root.translation('ID_IMPORT_USERS')"
variant="light">
<b-icon icon="arrow-repeat" aria-hidden="true" variant="success"/>
</b-button>
<b-button @click="downloadRow(props.row)"
v-b-tooltip.hover
:title="$root.translation('ID_DOWNLOAD_SETTINGS')"
variant="light">
<b-icon icon="arrow-down" aria-hidden="true" variant="info"/>
</b-button>
<b-button @click="syncGroups(props.row)"
v-b-tooltip.hover
:title="$root.translation('ID_GROUPS_SYNCHRONIZE')"
variant="light">
<b-icon icon="people-fill" aria-hidden="true" variant="warning"/>
</b-button>
<b-button @click="syncDepartments(props.row)"
v-b-tooltip.hover
:title="$root.translation('ID_DEPARTMENTS_SYNCHRONIZE')"
variant="light">
<b-icon icon="diagram3-fill" aria-hidden="true" variant="warning"/>
</b-button>
<b-button @click="$emit('editSettings',props.row)"
v-b-tooltip.hover
:title="$root.translation('ID_EDIT_SETTINGS')"
variant="light">
<b-icon icon="pencil-fill" aria-hidden="true" variant="info"/>
</b-button>
<b-button @click="deleteRow(props.row)"
v-b-tooltip.hover
:title="$root.translation('ID_DELETE_SETTINGS')"
variant="light">
<b-icon icon="trash" aria-hidden="true" variant="danger"/>
</b-button>
</b-button-group>
</b-tooltip>
</div>
</v-server-table>
<b-modal ref="as-b-modal-upload-file"
:title="$root.translation('ID_UPLOAD_CONNECTION_SETTINGS')"
hide-footer
size="lg">
<formUploadSource ref="formUploadSource"
@cancel="$refs['as-b-modal-upload-file'].hide();$refs.formUploadSource.reset();"
@optionSaveButton="optionSaveButton"
@optionUpdateButton="optionUpdateButton"
@optionNewButton="optionNewButton">
</formUploadSource>
</b-modal>
</div>
</template>
<script>
import titleSection from "./titleSection.vue"
import formUploadSource from "./formUploadSource.vue"
import axios from "axios"
export default {
components: {
titleSection,
formUploadSource
},
data() {
return {
baseUrl: this.$root.baseUrl() + "/authSources_Ajax?action=authSourcesList",
columns: [
"AUTH_SOURCE_NAME",
"AUTH_SOURCE_PROVIDER",
"AUTH_SOURCE_SERVER_NAME",
"AUTH_SOURCE_PORT",
"AUTH_SOURCE_ENABLED_TLS_LABEL",
"CURRENT_USERS",
"icons"
],
options: {
headings: {
AUTH_SOURCE_NAME: this.$root.translation("ID_NAME"),
AUTH_SOURCE_PROVIDER: this.$root.translation("ID_PROVIDER"),
AUTH_SOURCE_SERVER_NAME: this.$root.translation("ID_SERVER_NAME"),
AUTH_SOURCE_PORT: this.$root.translation("ID_PORT"),
AUTH_SOURCE_ENABLED_TLS_LABEL: this.$root.translation("ID_ENABLED_TLS"),
CURRENT_USERS: this.$root.translation("ID_ACTIVE_USERS"),
icons: ""
},
sortable: [
"AUTH_SOURCE_NAME",
"AUTH_SOURCE_PROVIDER",
"AUTH_SOURCE_SERVER_NAME",
"AUTH_SOURCE_PORT",
"AUTH_SOURCE_ENABLED_TLS_LABEL",
"CURRENT_USERS"
],
filterable: [
"AUTH_SOURCE_NAME",
"AUTH_SOURCE_PROVIDER",
"AUTH_SOURCE_SERVER_NAME",
"AUTH_SOURCE_PORT",
"AUTH_SOURCE_ENABLED_TLS_LABEL",
"CURRENT_USERS"
],
texts: {
filter: "",
filterPlaceholder: this.$root.translation("ID_EMPTY_SEARCH"),
count: this.$root.translation("ID_SHOWING_FROM_RECORDS_COUNT"),
noResults: this.$root.translation("ID_NO_MATCHING_RECORDS"),
loading: this.$root.translation("ID_LOADING_GRID")
},
perPage: 5,
perPageValues: [],
sortIcon: {
is: "glyphicon-sort",
base: "glyphicon",
up: "glyphicon-chevron-up",
down: "glyphicon-chevron-down"
},
requestKeys: {
query: "textFilter"
},
requestFunction(data) {
data.start = (data.page - 1) * data.limit;
return axios.get(this.url, {params: data}, {}).catch(function (e) {
this.dispatch("error", e);
});
},
responseAdapter(data) {
if (!("sources" in data.data)) {
data.data.sources = [];
}
if (!("total_sources" in data.data)) {
data.data.total_sources = 0;
}
return {
data: data.data.sources,
count: data.data.total_sources
};
}
},
tableData: []
};
},
methods: {
refresh() {
this.$refs.vServerTable1.refresh();
},
deleteRow(row) {
this.$root.$emit('bv::hide::tooltip');
this.$bvModal.msgBoxConfirm(this.$root.translation('ID_ARE_YOU_SURE_TO_DELETE_CONNECTION_PLEASE_CONFIRM', [row.AUTH_SOURCE_NAME]), {
title: " ", //is important because title disappear
hideHeaderClose: false,
okTitle: this.$root.translation('ID_YES'),
okVariant: "success",
cancelTitle: this.$root.translation('ID_NO'),
cancelVariant: "danger"
}).then(value => {
if (value === false) {
return;
}
let formData = new FormData();
formData.append("action", "deleteAuthSource");
formData.append("auth_uid", row.AUTH_SOURCE_UID);
axios.post(this.$root.baseUrl() + "authSources_Ajax", formData)
.then(response => {
response;
this.refresh();
})
.catch(error => {
error;
})
.finally(() => {
});
}).catch(err => {
err;
});
},
downloadRow(row) {
this.$root.$emit('bv::hide::tooltip');
let obj = JSON.parse(JSON.stringify(row)); //is need a object copy
//compatibility for complement ppsellucianldap
obj.AUTH_SOURCE_UID = "";
delete obj.AUTH_SOURCE_PASSWORD;
delete obj.CURRENT_USERS;
delete obj["UPPER(RBAC_AUTHENTICATION_SOURCE.AUTH_SOURCE_NAME)"];
delete obj.AUTH_SOURCE_VERSION;
delete obj.AUTH_SOURCE_ATTRIBUTES;
delete obj.AUTH_SOURCE_OBJECT_CLASSES;
delete obj.AUTH_SOURCE_DATA;
delete obj.AUTH_SOURCE_ENABLED_TLS_LABEL;
delete obj.LDAP_PAGE_SIZE_LIMIT;
if ("AUTH_SOURCE_GRID_ATTRIBUTE" in obj) {
let convert = [];
for (let i in obj.AUTH_SOURCE_GRID_ATTRIBUTE) {
let data = obj.AUTH_SOURCE_GRID_ATTRIBUTE[i] || {};
convert.push({
attributeLdap: data.attributeLdap || '',
attributeUser: data.attributeUser || '',
attributeRole: data.attributeRole || ''
});
}
obj.AUTH_SOURCE_GRID_ATTRIBUTE = convert;
}
//creation file
let name = obj.AUTH_SOURCE_NAME + ".json";
if (window.navigator.msSaveBlob) {
window.navigator.msSaveBlob(new Blob([JSON.stringify(obj)], {type: 'application/octet-stream'}), name);
return;
}
let a = document.createElement('a');
document.body.appendChild(a);
a.href = window.URL.createObjectURL(new Blob([JSON.stringify(obj)], {type: 'application/octet-stream'}));
a.download = name;
a.click();
document.body.removeChild(a);
},
importUsers(row) {
//the return action is in: processmaker/workflow/engine/templates/ldapAdvanced/ldapAdvancedSearch.js
location.href = this.$root.baseUrl() + 'authSources_SearchUsers?sUID=' + row.AUTH_SOURCE_UID;
},
syncGroups(row) {
//the return action is in: processmaker/workflow/engine/templates/authSources/authSourcesSynchronize.js
location.href = this.$root.baseUrl() + "authSourcesSynchronize?authUid=" + row.AUTH_SOURCE_UID + "&tab=synchronizeGroups";
},
syncDepartments(row) {
//the return action is in: processmaker/workflow/engine/templates/authSources/authSourcesSynchronize.js
location.href = this.$root.baseUrl() + "authSourcesSynchronize?authUid=" + row.AUTH_SOURCE_UID + "&tab=synchronizeDepartments";
},
optionSaveButton(fileContent) {
this.$refs['as-b-modal-upload-file'].hide();
this.$emit('optionSaveButton', fileContent);
},
optionUpdateButton(fileContent, row) {
this.$refs['as-b-modal-upload-file'].hide();
this.$emit('optionUpdateButton', fileContent, row);
},
optionNewButton(fileContent) {
this.$refs['as-b-modal-upload-file'].hide();
this.$emit('optionNewButton', fileContent);
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,166 @@
<template>
<div>
<b-form @submit.stop.prevent="onSave">
<b-container fluid>
<b-row>
<b-col>
<b-form-group :label="$root.translation('ID_PLEASE_ADD_THE_FILE_SETTINGS_TO_BE_UPLOADED')" v-if="newName==true">
<b-form-file v-model="form.connectionSettings"
@change="change"
:state="validateState('connectionSettings')"
:placeholder="$root.translation('ID_CHOOSE_A_FILE_OR_DROP_IT_HERE')"
:drop-placeholder="$root.translation('ID_DROP_FILE_HERE')">
</b-form-file>
<b-form-invalid-feedback>{{$root.translation('ID_IS_REQUIRED')}}</b-form-invalid-feedback>
</b-form-group>
<b-form-group :label="$root.translation('ID_CONNECTION_WITH_THE_SAME_NAME_PLEASE_SELECT_AN_OPTION')" v-else>
<b-form-file v-model="form.connectionSettings"
@change="change"
:state="validateState('connectionSettings')"
:placeholder="$root.translation('ID_CHOOSE_A_FILE_OR_DROP_IT_HERE')"
:drop-placeholder="$root.translation('ID_DROP_FILE_HERE')">
</b-form-file>
<b-form-invalid-feedback>{{$root.translation('ID_IS_REQUIRED')}}</b-form-invalid-feedback>
</b-form-group>
</b-col>
</b-row>
<b-row class="text-center">
<b-col>
<b-form-group v-if="newName==true">
<b-button variant="danger"
@click="$emit('cancel')">{{$root.translation('ID_CANCEL')}}</b-button>&nbsp;
<b-button type="submit"
variant="success"
:disabled='isDisabled'
id="save">{{$root.translation('ID_SAVE')}}</b-button>
</b-form-group>
<b-form-group v-else>
<b-button variant="danger"
@click="$emit('cancel')">{{$root.translation('ID_CANCEL')}}</b-button>&nbsp;
<b-button type="submit"
variant="primary"
:disabled='isDisabled'
id="update">{{$root.translation('ID_UPDATE_SETTINGS')}}</b-button>&nbsp;
<b-button type="submit"
variant="success"
:disabled='isDisabled'
id="new">{{$root.translation('ID_NEW_CONNECTION')}}</b-button>
</b-form-group>
</b-col>
</b-row>
</b-container>
</b-form>
<b-modal id="messageForInvalidFileExtension" ok-only static>{{$root.translation('ID_PMG_SELECT_FILE')}}</b-modal>
<b-modal id="messageForInvalidFileFormat" ok-only static>{{$root.translation('ID_INVALID_DATA')}}</b-modal>
</div>
</template>
<script>
import { validationMixin } from "vuelidate"
import { required } from "vuelidate/lib/validators"
import axios from "axios"
export default {
mixins: [validationMixin],
props: {
skipNameValidation: Boolean
},
components: {
},
validations: {
form: {
connectionSettings: {
required
}
}
},
data() {
return {
form: {
connectionSettings: []
},
fileContent: {},
isDisabled: true,
validationResult: {},
newName: true
};
},
methods: {
validateState(name) {
const {$dirty, $error} = this.$v.form[name];
return $dirty ? !$error : null;
},
onSave(e) {
this.$v.form.$touch();
if (this.$v.form.$anyError) {
return;
}
//validation
if (e.submitter.id === "save") {
this.$emit('optionSaveButton', this.fileContent);
}
if (e.submitter.id === "update") {
this.$emit('optionUpdateButton', this.fileContent, this.validationResult.row);
}
if (e.submitter.id === "new") {
this.fileContent.AUTH_SOURCE_NAME = this.validationResult.suggestName;
this.$emit('optionNewButton', this.fileContent);
}
},
reset() {
this.newName = true;
this.validationResult = {};
this.form.connectionSettings = [];
},
change(e) {
let input = e.target;
if (input.files.length <= 0) {
return;
}
let file = input.files[0];
if (file.name.indexOf(".json") < 0) {
this.$bvModal.show("messageForInvalidFileExtension");
this.reset();
this.isDisabled = true;
return;
}
let reader = new FileReader();
reader.readAsText(file, "UTF-8");
reader.onload = (e) => {
this.fileContent = JSON.parse(e.target.result);
//validation content
if (!("AUTH_SOURCE_NAME" in this.fileContent)) {
this.$bvModal.show("messageForInvalidFileFormat");
this.reset();
this.isDisabled = true;
return;
}
if (this.skipNameValidation === true) {
this.isDisabled = false;
return;
}
//validation name
let formData = new FormData();
formData.append("AUTH_SOURCE_NAME", this.fileContent.AUTH_SOURCE_NAME);
axios.post(this.$root.baseUrl() + "ldapAdvancedProxy.php?functionAccion=ldapVerifyName", formData)
.then(response => {
this.newName = response.data.row === false;
this.validationResult = response.data;
this.isDisabled = false;
})
.catch(error => {
error;
this.isDisabled = true;
})
.finally(() => {
});
};
reader.onerror = () => {
};
return;
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,142 @@
<template>
<div>
<titleSection :title="$root.translation('ID_MATCH_ATTRIBUTES')"></titleSection>
<b-form-group class="text-right">
<b-link href="#" @click="connectionSettings"> &lt;&lt; {{$root.translation('ID_CONNECTION_SETTINGS')}}</b-link>
</b-form-group>
<b-form-group class="float-right">
<b-button variant="success" @click="addAttribute">{{$root.translation('ID_ADD_ATTRIBUTE')}}</b-button>
</b-form-group>
<v-client-table :columns="columns"
:options="options"
:data="rows">
<div slot="icons"
slot-scope="props">
<b-button :id="'ma-b-button-tooltip-'+props.index"
variant="light"
size="sm"
class="mb-2">
<b-icon icon="three-dots-vertical" aria-hidden="true"/>
</b-button>
<b-tooltip :target="'ma-b-button-tooltip-'+props.index"
triggers="hover focus click"
custom-class="custom-tooltip"
placement="left"
variant="light">
<b-button-group>
<b-button @click="editAttribute(props.row,props.index)"
v-b-tooltip.hover
:title="$root.translation('ID_EDIT_ATTRIBUTE')"
variant="light">
<b-icon icon="pencil-fill" aria-hidden="true" variant="info"/>
</b-button>
<b-button @click="deleteAttribute(props.index,props.row)"
v-b-tooltip.hover
:title="$root.translation('ID_DELETE_ATTRIBUTE')"
variant="light">
<b-icon icon="trash" aria-hidden="true" variant="danger"/>
</b-button>
</b-button-group>
</b-tooltip>
</div>
</v-client-table>
<b-modal id="messageForDeleteAttribute"
@ok="deleteAttributeProcess"
:ok-title="$root.translation('ID_YES')"
ok-variant="success"
:cancel-title="$root.translation('ID_NO')"
cancel-variant="danger">
{{$root.translation('ID_ARE_YOU_SURE_TO_DELETE_ATTRIBUTE_PLEASE_CONFIRM',[selectedRowName])}}
</b-modal>
</div>
</template>
<script>
import titleSection from "./titleSection.vue"
export default {
components: {
titleSection
},
data() {
return {
selectedRowIndex: 0,
selectedRowName: "",
columns: [
"attributeRole",
"attributeUser",
"attributeLdap",
"icons"
],
options: {
headings: {
attributeRole: this.$root.translation('ID_ROLE'),
attributeUser: this.$root.translation('ID_USER_FIELD'),
attributeLdap: this.$root.translation('ID_LDAP_FIELD'),
icons: ""
},
sortable: [
"attributeLdap",
"attributeRole",
"attributeUser"
],
filterable: [
"attributeLdap",
"attributeRole",
"attributeUser"
],
texts: {
filter: "",
filterPlaceholder: this.$root.translation("ID_EMPTY_SEARCH"),
count: this.$root.translation("ID_SHOWING_FROM_RECORDS_COUNT"),
noResults: this.$root.translation("ID_NO_MATCHING_RECORDS"),
loading: this.$root.translation("ID_LOADING_GRID")
},
perPage: 5,
perPageValues: [],
sortIcon: {
is: "glyphicon-sort",
base: "glyphicon",
up: "glyphicon-chevron-up",
down: "glyphicon-chevron-down"
}
},
rows: []
};
},
methods: {
setRows(rows) {
this.rows = rows;
},
addAttribute() {
this.$emit("addAttribute");
},
editAttribute(row, index) {
this.$emit("editAttribute", row, index);
},
deleteAttribute(index, row) {
this.selectedRowName = row.attributeLdap;
this.selectedRowIndex = index;
this.$bvModal.show("messageForDeleteAttribute");
},
deleteAttributeProcess() {
this.rows.splice(this.selectedRowIndex - 1, 1);
},
saveRow(obj) {
if (obj.index === null) {
delete obj.index;
this.rows.push(obj);
} else {
let i = obj.index;
delete obj.index;
this.rows[i - 1] = obj;
}
},
connectionSettings() {
this.$emit('connectionSettings', this.rows);
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,55 @@
<template>
<div>
<titleSection :title="title"></titleSection>
<formAuthenticationSources ref="formAuthenticationSources"
@matchAttributesToSync="$emit('matchAttributesToSync',$event)"
@cancel="cancel"
@save="$emit('save',$event)"/>
</div>
</template>
<script>
import titleSection from "./titleSection.vue"
import formAuthenticationSources from "./formAuthenticationSources.vue"
export default {
data() {
return {
title: "#"
};
},
components: {
titleSection,
formAuthenticationSources
},
methods: {
setTitle(value) {
this.title = value;
},
reset() {
this.$refs.formAuthenticationSources.reset();
},
load(obj) {
this.$refs.formAuthenticationSources.load(obj);
},
cancel() {
this.reset();
this.$emit('cancel');
},
rowToForm(row) {
return this.$refs.formAuthenticationSources.rowToForm(row);
},
formToFormData(form) {
return this.$refs.formAuthenticationSources.formToFormData(form);
},
setGridText(data) {
this.$refs.formAuthenticationSources.setGridText(data);
},
getGridText() {
return this.$refs.formAuthenticationSources.getGridText();
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,122 @@
<template>
<div>
<titleSection :title="$root.translation('ID_NEW_MATCHED_ATTRIBUTE')"></titleSection>
<b-form @submit.stop.prevent="onSave">
<b-container fluid>
<b-row>
<b-col>
<b-form-group :label="$root.translation('ID_ROLE')">
<b-form-select v-model="form.attributeRole"
:options="roles"/>
</b-form-group>
<b-form-group :label="$root.translation('ID_PROCESSMAKER_USER_FIELD')" description="">
<b-form-select v-model="form.attributeUser"
:options="userAttributes"/>
</b-form-group>
<b-form-group :label="$root.translation('ID_LDAP_ATTRIBUTE')">
<b-form-input v-model="form.attributeLdap"
:state="validateState('attributeLdap')"
placeholder=""/>
<b-form-invalid-feedback>{{$root.translation('ID_IS_REQUIRED')}}</b-form-invalid-feedback>
</b-form-group>
</b-col>
</b-row>
<b-row class="text-right">
<b-col>
<b-form-group>
<b-button variant="danger" @click="$emit('cancel')">{{$root.translation('ID_CANCEL')}}</b-button>&nbsp;
<b-button type="submit" variant="success">{{$root.translation('ID_SAVE')}}</b-button>
</b-form-group>
</b-col>
</b-row>
</b-container>
</b-form>
</div>
</template>
<script>
import { validationMixin } from "vuelidate"
import { required } from "vuelidate/lib/validators"
import titleSection from "./titleSection.vue"
export default {
mixins: [validationMixin],
components: {
titleSection
},
validations: {
form: {
attributeLdap: {
required
}
}
},
data() {
return {
form: {
index: null,
attributeLdap: "",
attributeRole: "",
attributeUser: "USR_FIRSTNAME"
},
roles: [
{value: "", text: "All"},
{value: "PROCESSMAKER_ADMIN", text: this.$root.translation("ID_SYSTEM_ADMINISTRATOR")},
{value: "PROCESSMAKER_MANAGER", text: this.$root.translation("ID_MANAGER")},
{value: "PROCESSMAKER_OPERATOR", text: this.$root.translation("ID_OPERATOR")}
],
userAttributes: [
{value: "USR_FIRSTNAME", text: "USR_FIRSTNAME"},
{value: "USR_LASTNAME", text: "USR_LASTNAME"},
{value: "USR_EMAIL", text: "USR_EMAIL"},
{value: "USR_DUE_DATE", text: "USR_DUE_DATE"},
{value: "USR_STATUS", text: "USR_STATUS"},
{value: "USR_STATUS_ID", text: "USR_STATUS_ID"},
{value: "USR_ADDRESS", text: "USR_ADDRESS"},
{value: "USR_PHONE", text: "USR_PHONE"},
{value: "USR_FAX", text: "USR_FAX"},
{value: "USR_CELLULAR", text: "USR_CELLULAR"},
{value: "USR_ZIP_CODE", text: "USR_ZIP_CODE"},
{value: "USR_POSITION", text: "USR_POSITION"},
{value: "USR_BIRTHDAY", text: "USR_BIRTHDAY"},
{value: "USR_COST_BY_HOUR", text: "USR_COST_BY_HOUR"},
{value: "USR_UNIT_COST", text: "USR_UNIT_COST"},
{value: "USR_PMDRIVE_FOLDER_UID", text: "USR_PMDRIVE_FOLDER_UID"},
{value: "USR_BOOKMARK_START_CASES", text: "USR_BOOKMARK_START_CASES"},
{value: "USR_TIME_ZONE", text: "USR_TIME_ZONE"},
{value: "USR_DEFAULT_LANG", text: "USR_DEFAULT_LANG"},
{value: "USR_LAST_LOGIN", text: "USR_LAST_LOGIN"}
]
};
},
methods: {
validateState(name) {
const {$dirty, $error} = this.$v.form[name];
return $dirty ? !$error : null;
},
onSave() {
this.$v.form.$touch();
if (this.$v.form.$anyError) {
return;
}
this.$emit("save", this.form);
},
load(row, index) {
this.form.index = index;
this.form.attributeLdap = row.attributeLdap;
this.form.attributeRole = row.attributeRole;
this.form.attributeUser = row.attributeUser;
},
reset() {
this.form = {
index: null,
attributeLdap: "",
attributeRole: "",
attributeUser: "USR_FIRSTNAME"
};
}
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,18 @@
<template>
<div>
<h3 class="text-primary">
{{title}}
</h3>
</div>
</template>
<script>
export default{
props: {
title: String
}
}
</script>
<style scoped>
</style>

View File

@@ -0,0 +1,33 @@
import Vue from 'vue'
import {BootstrapVue, IconsPlugin} from 'bootstrap-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import {ClientTable} from 'vue-tables-2'
import {ServerTable} from 'vue-tables-2'
import App from './App.vue';
Vue.config.productionTip = false
Vue.use(BootstrapVue)
Vue.use(IconsPlugin)
Vue.use(ClientTable, {}, false, 'bootstrap4', {});
Vue.use(ServerTable, {}, false, 'bootstrap4', {});
new Vue({
render: h => h(App),
methods: {
translation(text, params) {
if ("TRANSLATIONS" in window && text in window.TRANSLATIONS) {
text = window.TRANSLATIONS[text];
if (params != undefined && "length" in params) {
for (let i = 0; i < params.length; i++) {
text = text.replace("{" + i + "}", params[i]);
}
}
}
return text;
},
baseUrl() {
return "../authSources/";
}
}
}).$mount('#app');

View File

@@ -0,0 +1,3 @@
module.exports = {
publicPath: '/lib/authenticationSources/'
};

View File

@@ -38,7 +38,7 @@ Ext.onReady(function() {
text : _('ID_BACK'),
iconCls: "button_menu_ext ss_sprite ss_arrow_left",
handler: function() {
location.href = '../authSources/authSources_List';
location.href = "../authenticationSources/index";
}
});

View File

@@ -71,7 +71,7 @@ Ext.onReady(function() {
handler: function ()
{
redirectPage("authSources_List");
location.href = "../authenticationSources/index";
}
});
}