Avoid permission errors by doing nothing when user clicks on event they have no permission to view

This commit is contained in:
Nathan Gray 2016-02-23 22:23:01 +00:00
parent b2d1f0edbe
commit 101742e39b
4 changed files with 7 additions and 9 deletions

View File

@ -1595,7 +1595,11 @@ var et2_calendar_timegrid = et2_calendar_view.extend([et2_IDetachedDOM, et2_IRes
result = this.onclick.apply(this, args);
}
if(event.id && result && !this.disabled && !this.options.readonly)
var event_node = $j(event.event_node);
if(event.id && result && !this.disabled && !this.options.readonly &&
// Permissions - opening will fail if we try
event_node && !(event_node.hasClass('rowNoView'))
)
{
if(event.widget_id && this.getWidgetById(event.widget_id))
{

View File

@ -584,7 +584,7 @@ Hide subsequent headers in week view with non-consolidated owners
background-color: #808080;
}
.calendar_calEvent:hover{
.calendar_calEvent:not(.rowNoView):hover{
cursor: pointer;
}

View File

@ -586,7 +586,7 @@ Hide subsequent headers in week view with non-consolidated owners
border-color: #808080;
background-color: #808080;
}
.calendar_calEvent:hover {
.calendar_calEvent:not(.rowNoView):hover {
cursor: pointer;
}
/** Multi-line ellipsis */
@ -1971,9 +1971,6 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget
*/
background-color: #679fd2;
}
.calendar_calEvent:hover {
cursor: pointer;
}
.calendar_calEvent:not([class*=" cat_"]) {
/* Defaults for no category, so we don't override it */
background-color: #679fd2;

View File

@ -867,9 +867,6 @@ e.g. the div with class calendar_calTimeGrid is generated by the timeGridWidget
*/
background-color: @egw_color_blue_lightest;
}
.calendar_calEvent:hover{
cursor: pointer;
}
.calendar_calEvent:not([class*=" cat_"]) {
/* Defaults for no category, so we don't override it */
background-color: @egw_color_blue_lightest;