From 335e1c575818ad0d676394c1bb16dcd02a7d2fcb Mon Sep 17 00:00:00 2001 From: "S.Listl" <S.Listl@SLISTL.aditosoftware.local> Date: Wed, 17 Jul 2019 13:53:23 +0200 Subject: [PATCH] merge --- .../AttributeRelation_entity.aod | 6 +- .../SerialLetter_entity.aod | 60 ------------- .../entityfields/role/displayValueProcess.js | 10 --- .../excluderoles_param/valueProcess.js | 3 - .../recordcontainers/jdito/contentProcess.js | 24 ----- .../recordcontainers/jdito/onDelete.js | 19 ---- .../recordcontainers/jdito/onInsert.js | 23 ----- .../recordcontainers/jdito/onUpdate.js | 25 ------ entity/targetId/targetId.aod | 88 ------------------- 9 files changed, 1 insertion(+), 257 deletions(-) delete mode 100644 entity/targetId/entityfields/role/displayValueProcess.js delete mode 100644 entity/targetId/entityfields/roles/children/excluderoles_param/valueProcess.js delete mode 100644 entity/targetId/recordcontainers/jdito/contentProcess.js delete mode 100644 entity/targetId/recordcontainers/jdito/onDelete.js delete mode 100644 entity/targetId/recordcontainers/jdito/onInsert.js delete mode 100644 entity/targetId/recordcontainers/jdito/onUpdate.js delete mode 100644 entity/targetId/targetId.aod diff --git a/entity/AttributeRelation_entity/AttributeRelation_entity.aod b/entity/AttributeRelation_entity/AttributeRelation_entity.aod index 69ec8245a8..876d9101af 100644 --- a/entity/AttributeRelation_entity/AttributeRelation_entity.aod +++ b/entity/AttributeRelation_entity/AttributeRelation_entity.aod @@ -2,11 +2,7 @@ <entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.10" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.10"> <name>AttributeRelation_entity</name> <majorModelMode>DISTRIBUTED</majorModelMode> - <titlePlural>Attributes</ti<grantDeleteProcess>%aditoprj%/entity/AttributeRelation_entity/grantDeleteProcess.js</grantDeleteProcess> - tlePlural> - <recordContainer>jdito</recordContainer> - <entityFields> - <entityProvider> + <grantDeleteProcess>%aditoprj%/entity/AttributeRelation_entity/grantDeleteProcess.js</grantDeleteProcess> <titlePlural>Attributes</titlePlural> <recordContainer>jdito</recordContainer> <entityFields> diff --git a/entity/SerialLetter_entity/SerialLetter_entity.aod b/entity/SerialLetter_entity/SerialLetter_entity.aod index 36c638e84e..75c5323c1e 100644 --- a/entity/SerialLetter_entity/SerialLetter_entity.aod +++ b/entity/SerialLetter_entity/SerialLetter_entity.aod @@ -117,63 +117,3 @@ </dbRecordContainer> </recordContainers> </entity> - <name>bc81b1c3-ce99-4581-ac70-4e24bebb0c75</name> - <tableName>DOCUMENTTEMPLATE</tableName> - <primaryKey>DOCUMENTTEMPLATEID</primaryKey> - <isUIDTable v="false" /> - <readonly v="true" /> - </linkInformation> - </linkInformation> - <recordFieldMappings> - <dbRecordFieldMapping> - <name>DOCUMENTTEMPLATE_ID.value</name> - <recordfield>SERIALLETTER.DOCUMENTTEMPLATE_ID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>SERIALLETTERID.value</name> - <recordfield>SERIALLETTER.SERIALLETTERID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - </entityFields> - <recordContainers> - <dbRecordContainer> - <name>db</name> - <alias>Data_alias</alias> - <fromClauseProcess>%aditoprj%/entity/SerialLetter_entity/recordcontainers/db/fromClauseProcess.js</fromClauseProcess> - <linkInformation> - <linkInformation> - <name>5d9c983a-b129-437a-ae9d-203fb8ad03ec</name> - <tableName>SERIALLETTER</tableName> - <primaryKey>SERIALLETTERID</primaryKey> - <isUIDTable v="true" /> - <readonly v="false" /> - </linkInformation> - <linkInformation> - <name>bc81b1c3-ce99-4581-ac70-4e24bebb0c75</name> - <tableName>DOCUMENTTEMPLATE</tableName> - <primaryKey>DOCUMENTTEMPLATEID</primaryKey> - <isUIDTable v="false" /> - <readonly v="true" /> - </linkInformation> - </linkInformation> - <recordFieldMappings> - <dbRecordFieldMapping> - <name>DOCUMENTTEMPLATE_ID.value</name> - <recordfield>SERIALLETTER.DOCUMENTTEMPLATE_ID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>SERIALLETTERID.value</name> - <recordfield>SERIALLETTER.SERIALLETTERID</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>DOCUMENTTEMPLATE_ID.displayValue</name> - <recordfield>DOCUMENTTEMPLATE.NAME</recordfield> - </dbRecordFieldMapping> - <dbRecordFieldMapping> - <name>TITLE.value</name> - <recordfield>SERIALLETTER.TITLE</recordfield> - </dbRecordFieldMapping> - </recordFieldMappings> - </dbRecordContainer> - </recordContainers> -</entity> diff --git a/entity/targetId/entityfields/role/displayValueProcess.js b/entity/targetId/entityfields/role/displayValueProcess.js deleted file mode 100644 index 42459f2d1c..0000000000 --- a/entity/targetId/entityfields/role/displayValueProcess.js +++ /dev/null @@ -1,10 +0,0 @@ -import("system.result"); -import("system.vars"); -import("system.tools"); - -var allRoles = tools.getAllRoles(); -var roleTitle = vars.get("$this.value"); -if (roleTitle in allRoles) - roleTitle = allRoles[roleTitle][0]; - -result.string(roleTitle); \ No newline at end of file diff --git a/entity/targetId/entityfields/roles/children/excluderoles_param/valueProcess.js b/entity/targetId/entityfields/roles/children/excluderoles_param/valueProcess.js deleted file mode 100644 index 5ecb260c23..0000000000 --- a/entity/targetId/entityfields/roles/children/excluderoles_param/valueProcess.js +++ /dev/null @@ -1,3 +0,0 @@ -import("system.result"); - -result.string(JSON.stringify(["INTERNAL_EVERYONE", "INTERNAL_GROUPWARE", "INTERNAL_SNMP", "INTERNAL_DESIGNER", "INTERNAL_TECHNICAL"])); \ No newline at end of file diff --git a/entity/targetId/recordcontainers/jdito/contentProcess.js b/entity/targetId/recordcontainers/jdito/contentProcess.js deleted file mode 100644 index 069f2a6ebc..0000000000 --- a/entity/targetId/recordcontainers/jdito/contentProcess.js +++ /dev/null @@ -1,24 +0,0 @@ -import("system.result"); -import("system.vars"); -import("system.tools"); - -var roles = []; -var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param"); -var allRoles = tools.getAllRoles(); - -if (userTitle && tools.existUsers(userTitle)) -{ - var existsObj = {}; - tools.getRoles(userTitle).forEach(function (role) - { - if (!this[role] && role != "INTERNAL_EVERYONE") - { - var roleTitle = role; - if (role in allRoles) - roleTitle = allRoles[role][0]; - roles.push([role, role, roleTitle]); - this[role] = true; - } - }, existsObj); -} -result.object(roles); \ No newline at end of file diff --git a/entity/targetId/recordcontainers/jdito/onDelete.js b/entity/targetId/recordcontainers/jdito/onDelete.js deleted file mode 100644 index 6056936e83..0000000000 --- a/entity/targetId/recordcontainers/jdito/onDelete.js +++ /dev/null @@ -1,19 +0,0 @@ -import("system.result"); -import("system.vars"); -import("system.tools"); - -var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param"); -var role = vars.get("$local.uid"); - -if (userTitle) -{ - var user = tools.getUser(userTitle); - var roles = tools.getRoles(userTitle); - roles = roles.filter(function (row) - { - return row != role; - }); - user[tools.ROLES] = roles; - - tools.updateUser(user); -} \ No newline at end of file diff --git a/entity/targetId/recordcontainers/jdito/onInsert.js b/entity/targetId/recordcontainers/jdito/onInsert.js deleted file mode 100644 index ed2348095f..0000000000 --- a/entity/targetId/recordcontainers/jdito/onInsert.js +++ /dev/null @@ -1,23 +0,0 @@ -import("system.result"); -import("system.vars"); -import("system.tools"); - -var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param"); -var newRole = vars.get("$local.rowdata")["ROLE.value"]; - -if (userTitle && tools.existUsers(userTitle) && newRole != "INTERNAL_EVERYONE") -{ - var user = tools.getUser(userTitle); - var roles = tools.getRoles(userTitle); - var roleObj = {}; - roles = [newRole].concat(roles) - .filter(function (role) - { - var exists = role in this; - this[role] = true; - return !exists; - }, roleObj); - user[tools.ROLES] = roles; - - tools.updateUser(user); -} \ No newline at end of file diff --git a/entity/targetId/recordcontainers/jdito/onUpdate.js b/entity/targetId/recordcontainers/jdito/onUpdate.js deleted file mode 100644 index ef9a53fb8d..0000000000 --- a/entity/targetId/recordcontainers/jdito/onUpdate.js +++ /dev/null @@ -1,25 +0,0 @@ -import("system.result"); -import("system.vars"); -import("system.tools"); - -var userTitle = vars.exists("$param.UserTitle_param") && vars.get("$param.UserTitle_param"); -var oldRole = vars.get("$local.uid"); -var newRole = vars.get("$local.rowdata")["ROLE.value"]; - -if (userTitle && oldRole != newRole) -{ - var user = tools.getUser(userTitle); - var roles = tools.getRoles(userTitle); - var roleObj = {}; - roleObj[oldRole] = true; - roles = [newRole].concat(roles) - .filter(function (role) - { - var exists = role in roleObj; - roleObj[role] = true; - return !exists; - }); - user[tools.ROLES] = roles; - - tools.updateUser(user); -} \ No newline at end of file diff --git a/entity/targetId/targetId.aod b/entity/targetId/targetId.aod deleted file mode 100644 index 5a18fa7720..0000000000 --- a/entity/targetId/targetId.aod +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<entity xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.3.9" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/entity/1.3.9"> - <name>EmployeeRole_entity</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <title>Role</title> - <titlePlural>Roles</titlePlural> - <recordContainer>jdito</recordContainer> - <entityFields> - <entityProvider> - <name>#PROVIDER</name> - </entityProvider> - <entityField> - <name>UID</name> - </entityField> - <entityParameter> - <name>UserTitle_param</name> - <expose v="true" /> - <mandatory v="true" /> - <description>PARAMETER</description> - </entityParameter> - <entityProvider> - <name>EmployeeRoles</name> - <dependencies> - <entityDependency> - <name>3bcec57a-7165-4773-9253-5ecab26ee3f4</name> - <entityName>Employee_entity</entityName> - <fieldName>EmployeeRoles</fieldName> - <isConsumer v="false" /> - </entityDependency> - </dependencies> - <children> - <entityParameter> - <name>UserTitle_param</name> - <expose v="true" /> - <mandatory v="true" /> - </entityParameter> - </children> - </entityProvider> - <entityField> - <name>ROLE</name> - <title>Role</title> - <consumer>Roles</consumer> - <linkedContext>Role</linkedContext> - <displayValueProcess>%aditoprj%/entity/EmployeeRole_entity/entityfields/role/displayValueProcess.js</displayValueProcess> - </entityField> - <entityConsumer> - <name>Roles</name> - <dependency> - <name>dependency</name> - <entityName>Role_entity</entityName> - <fieldName>FilteredRoles</fieldName> - </dependency> - <children> - <entityParameter> - <name>ExcludeRoles_param</name> - <valueProcess>%aditoprj%/entity/EmployeeRole_entity/entityfields/roles/children/excluderoles_param/valueProcess.js</valueProcess> - </entityParameter> - </children> - </entityConsumer> - <entityField> - <name>TARGETCONTEXT</name> - </entityField> - </entityFields> - <recordContainers> - <jDitoRecordContainer> - <name>jdito</name> - <jDitoRecordAlias>Data_alias</jDitoRecordAlias> - <contentProcess>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/contentProcess.js</contentProcess> - <onInsert>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onInsert.js</onInsert> - <onUpdate>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onUpdate.js</onUpdate> - <onDelete>%aditoprj%/entity/EmployeeRole_entity/recordcontainers/jdito/onDelete.js</onDelete> - <recordFieldMappings> - <jDitoRecordFieldMapping> - <name>UID.value</name> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>ROLE.value</name> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>ROLE.displayValue</name> - </jDitoRecordFieldMapping> - <jDitoRecordFieldMapping> - <name>TARGETCONTEXT.value</name> - </jDitoRecordFieldMapping> - </recordFieldMappings> - </jDitoRecordContainer> - </recordContainers> -</entity> -- GitLab