Skip to content
Snippets Groups Projects
Commit 313cb5dd authored by Sebastian Pongratz's avatar Sebastian Pongratz :ping_pong: Committed by Johannes Goderbauer
Browse files

[Projekt: Entwicklung - Neon][TicketNr.: 1056803][Calenderberechtigung:...

[Projekt: Entwicklung - Neon][TicketNr.: 1056803][Calenderberechtigung: Benutzer kann nicht bearbeiten aber erstellen]
parent e4db28b5
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,8 @@
<documentation>%aditoprj%/entity/Appointment_entity/documentation.adoc</documentation>
<title>Appointment</title>
<siblings />
<grantUpdateProcess>%aditoprj%/entity/Appointment_entity/grantUpdateProcess.js</grantUpdateProcess>
<grantDeleteProcess>%aditoprj%/entity/Appointment_entity/grantDeleteProcess.js</grantDeleteProcess>
<afterUiInit>%aditoprj%/entity/Appointment_entity/afterUiInit.js</afterUiInit>
<titlePlural>Appointments</titlePlural>
<recordContainer>jdito</recordContainer>
......
import("system.vars");
import("system.result");
import("system.calendars");
import("system.text");
var owner = text.decodeMS(JSON.parse(vars.get("$param.Entry_param"))["h"])[1].split(":")[1];
result.string(calendars.hasPermission([owner], calendars.VEVENT, "WRITE"));
\ No newline at end of file
import("system.vars");
import("system.result");
import("system.calendars");
import("system.text");
var owner = text.decodeMS(JSON.parse(vars.get("$param.Entry_param"))["h"])[1].split(":")[1];
result.string(calendars.hasPermission([owner], calendars.VEVENT, "WRITE"));
......@@ -157,8 +157,9 @@ AppointmentUtils.setAppointmentLinkComponentState = function(pSysRecordstate, pA
{
var currentUserId = CalendarUtil.getEffectiveCalendarIdFromUser(tools.getCurrentUser());
var organzierId = CalendarUtil.getEffectiveCalendarIdFromUser(tools.getUser(entry[calendars.ORGANIZER2]["cn"], tools.PROFILE_DEFAULT));
var owner = text.decodeMS(entry["h"])[1].split(":")[1]
if(currentUserId && currentUserId == organzierId)
if(currentUserId && currentUserId == organzierId || calendars.hasPermission([owner], calendars.VEVENT, "WRITE"))
return neon.COMPONENTSTATE_EDITABLE;
else
return neon.COMPONENTSTATE_DISABLED;
......
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