Skip to content
Snippets Groups Projects
Commit 2b976066 authored by Johannes Goderbauer's avatar Johannes Goderbauer
Browse files

Merge branch '1045207-calendar_rights_bug_fix' into 'master'

1045207 calendar rights bug fix

See merge request xrm/basic!166
parents cccae17c c55c1a30
No related branches found
No related tags found
No related merge requests found
......@@ -84,7 +84,6 @@
<entityField>
<name>PERMISSIONPROCURER_ROWID</name>
<title>Permission procurer</title>
<consumer></consumer>
<mandatory v="true" />
<state>READONLY</state>
<valueProcess>%aditoprj%/entity/PermissionCalendar_entity/entityfields/permissionprocurer_rowid/valueProcess.js</valueProcess>
......@@ -135,6 +134,7 @@
</entityProvider>
<entityParameter>
<name>PermissionProcurer_param</name>
<valueProcess>%aditoprj%/entity/PermissionCalendar_entity/entityfields/permissionprocurer_param/valueProcess.js</valueProcess>
<expose v="true" />
<mandatory v="true" />
</entityParameter>
......@@ -174,7 +174,7 @@
<dependency>
<name>dependency</name>
<entityName>Employee_entity</entityName>
<fieldName>EmployeesByUserId</fieldName>
<fieldName>EmployeesByShortUserId</fieldName>
</dependency>
</entityConsumer>
<entityField>
......
......@@ -4,4 +4,5 @@ import("system.neon");
var params = {};
params["PermissionDealerType_param"] = PermissionCalendar.objectTypeDepartment();
params["PermissionProcurer_param"] = vars.get("$param.PermissionProcurer_param");
neon.openContext("PermissionCalendar", null, null, neon.OPERATINGSTATE_NEW, params);
\ No newline at end of file
......@@ -4,4 +4,5 @@ import("system.neon");
var params = {};
params["PermissionDealerType_param"] = PermissionCalendar.objectTypeUser();
params["PermissionProcurer_param"] = vars.get("$param.PermissionProcurer_param");
neon.openContext("PermissionCalendar", null, null, neon.OPERATINGSTATE_NEW, params);
\ No newline at end of file
......@@ -14,7 +14,7 @@ else if (dealerType == PermissionCalendar.objectTypeDepartment())
else
dealerId = "";
if(dealerId == EmployeeUtils.sliceUserId(EmployeeUtils.getCurrentUserId()))
if(dealerId == vars.get("$param.PermissionProcurer_param"))
result.string(translate.text("You can't set a permission to yourself!"));
if(vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW)
......
......@@ -52,18 +52,6 @@
<name>5acac530-7ff7-4fd1-ac48-4a9c441a8b13</name>
<entityField>DESCRIPTION</entityField>
</neonTableColumn>
<neonTableColumn>
<name>02d4201a-d6f1-4155-a637-2807d19ebba3</name>
<entityField>UID</entityField>
</neonTableColumn>
<neonTableColumn>
<name>d5424182-30ee-4da4-a8ca-74a3f44cbdfc</name>
<entityField>SHORT_UID</entityField>
</neonTableColumn>
<neonTableColumn>
<name>9183e905-7784-46b8-b94a-365c8de9f676</name>
<entityField>CONTACT_ID</entityField>
</neonTableColumn>
</columns>
</tableViewTemplate>
</children>
......
......@@ -2,6 +2,7 @@
<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.6" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.6">
<name>PermissionCalendarPreview_view</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<size>SMALL</size>
<layout>
<headerFooterLayout>
<name>layout</name>
......
......@@ -214,10 +214,10 @@ PermissionCalendar._getDataRecursive = function(pRoot, pCurrentUser, pPermission
let inheritedPermission = pRoot[3];
PermissionCalendar._createRowUser(pRoot[0], inheritedPermission, pCurrentUser, pPermissions, pUser, pResultArr);
let depts = PermissionCalendar._getDepartments(pRoot[0], inheritedPermission, pPermissions);
let depts = PermissionCalendar._getDepartments(pRoot[0], inheritedPermission, pPermissions, pResultArr);
depts.forEach(function(item, i)
{
PermissionCalendar._getDataRecursive(item, pCurrentUser, pPermissions, pUser);
PermissionCalendar._getDataRecursive(item, pCurrentUser, pPermissions, pUser, pResultArr);
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment