Bug/Feature - Reports, Filters, Charts Visualisations

This is a big mess we have drag for many years and its time to put a pause and fix it for once and all.

The issue:

  • if user esteban.ribicic (no admin) creates a filter it will show data relating to him, but if he creates a notification (report) that sends that send filter, the notification will send all data not just the data related to him
  • the same as above applies on a report (section or item report), if esteban.ribicic creates a report and adds a chart or filter it will use data from all the section (assuming a section report)
  • if esteban.ribicic logs into eramba and generates (view) an item or section report, he will see all data. whoever created a report has no way to limit things by “whom is looking at them”

fix (tentative):

  • when a user creates a report template (item or section):

    • there must be a difference in between WHO CREATES a template (anyone with ACL rights) and WHO VIEWS a template
    • VIEW: esteban.ribicic can create a report, adds adriana.ribicic as a owner of the report too, now adriana.ribicic can see the template available…but when they run the report the results WILL BE different as they have most likely different ownerships of items … this is of course assuming they dont have full rights by visualisation exception.
    • charts on reports dont need anything special (as they have now a “visualisation”) permission
  • filter is the same logic, esteban.ribicic can create a filter but:

    • adriana.ribicic wont see it until she is put as owner of the filter (by esteban)
    • the filter will produce different results (as their ownership of items is different)
    • adriana and esteban can have their own display settings (columns width, wrap text and column order)
  • when creating a report notification…

    • the user sees the notification or not based on who own the notification
    • esteban can create a report notification based on a filter (that he owns otherwise he can not see it) , when cron runs the notification it will use the filter ownership to “run as”…

if esteban.ribicic owns a filter that is used on a notification and a report , but then esteban stops owning the filter for whatever reason, or the filter is deleted from the system … what happens? no idea.

int ref: https://eramba.zendesk.com/agent/tickets/11187
int ref: https://github.com/eramba/eramba_v2/issues/2575

default filters on sections (when someone clicks on an email) is something that might also come handy to be able to define as a setting

ref: https://eramba.zendesk.com/agent/tickets/11218