[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] Calendar: Prevent user without the view_events permission to see the popup description
"Victor Emanouilov \(@kroky\) via TikiWiki-cvs" <[email protected]>
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6982f34a126fe_3b1842f0478c3@gitlab-sidekiq-low-urgency-cpu-bound-v2-65d8676567-9prtg.mail> |
Victor Emanouilov pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
8f6532ee by Adrien Mbuya Maloba at 2026-02-04T07:11:55+00:00
[FIX] Calendar: Prevent user without the view_events permission to see the popup description
---
* [FIX] Calendar: Prevent user without the view_events permission to see the popup description
See merge request tikiwiki/tiki!9482
- - - - -
2 changed files:
- lib/core/Services/Calendar/Controller.php
- src/js/jquery-tiki/tiki-calendar.js
Changes:
=====================================
lib/core/Services/Calendar/Controller.php
=====================================
@@ -157,14 +157,6 @@ class Services_Calendar_Controller extends Services_Calendar_BaseController
}
}
- $listevents = Perms::filter(
- ['type' => 'calendaritem'],
- 'object',
- $listevents,
- ['object' => 'calitemId'],
- ['view_events']
- );
-
$parserLib = TikiLib::lib('parser');
$events = [];
@@ -211,7 +203,6 @@ class Services_Calendar_Controller extends Services_Calendar_BaseController
'id' => $event['calitemId'],
'title' => $event['name'],
'extendedProps' => [
- 'viewable' => $event['perms']->view_events,
'description' => ! empty($event['description']) ? $parserLib->parse_data(
$event['description'],
[
=====================================
src/js/jquery-tiki/tiki-calendar.js
=====================================
@@ -181,7 +181,8 @@ $.fn.setupEventCalendar = function (
}
}
const eventTitle = tooltipEscape(event.title);
- element.attr("title", eventTitle + "|" + event.extendedProps.description);
+ const eventDescription = event.extendedProps.viewable === true ? event.extendedProps.description : "";
+ element.attr("title", eventTitle + "|" + eventDescription);
element.addClass("tips");
// surely there's a better way?
$(element).parent().tiki_popover();
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8f6532eeb628635ffb7b52cddc2c3b850c4318c9
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/8f6532eeb628635ffb7b52cddc2c3b850c4318c9
You're receiving this email because of your account on gitlab.com.
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs