You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to create events for specific security groups (who only have access to certain pages on the front end of the site). These events still show in the events list on the Calendar Page no matter whether you are logged in or not. Once you click on an event a 'you can't view this page' message is displayed, but since the bulk of the event details are displayed on the Calendar event list, this isn't really acceptable.
I think this is because the events call is a straight SQL query, instead of using Silverstripe's CalendarEvent::get() functionality.
For a quick fix, I'm adding <% if canView %> into my template. But I really loathe to do this.
Is a fix for this possible? I understand it may be a bit of work...
The text was updated successfully, but these errors were encountered:
Yeah, this is a really tricky issue in a lot of SS applications (the SiteTree is a great example). I would recommend using the filterByCallback method on DataList. It's a huge performance hit, but I think it's cleaner than putting it on the template, mostly because you get a limited list, rather than hiding stuff with display logic, so your $Events.Count is accurate.
I would be happy to do this if I could do it without editing the source code of the module. We try to avoid that at all costs (using extensions instead), so that we can easily upgrade in the future.
I don't think I can add a filter to the Events call without modifying the module code, can I?
I need to create events for specific security groups (who only have access to certain pages on the front end of the site). These events still show in the events list on the Calendar Page no matter whether you are logged in or not. Once you click on an event a 'you can't view this page' message is displayed, but since the bulk of the event details are displayed on the Calendar event list, this isn't really acceptable.
I think this is because the events call is a straight SQL query, instead of using Silverstripe's CalendarEvent::get() functionality.
For a quick fix, I'm adding <% if canView %> into my template. But I really loathe to do this.
Is a fix for this possible? I understand it may be a bit of work...
The text was updated successfully, but these errors were encountered: