← Back to team overview

mahara-contributors team mailing list archive

[Bug 1738898] [NEW] Elasticsearch not updating indexed items when access rules change

 

Public bug reported:

When a page has it's access rules changed (but not other editing) the
elasticsearch does not update the index for the items involved.

There is an add_to_queue_access() function that is meant to check what
pages have had their access changed since they were indexed. It was
designed to catch the pages which have a start/stop date.

But that is not quite sufficient.

Problems:
1) If a page is indexed and then later it's access rules are changed the page and it;s artefacts/blocks were not getting re-indexed to reflect the rule change

- need the add_to_queue_access() a check for view_access rows whose
'ctime' value is within the range being checked.

2) If a page did get found with the add_to_queue_access() function it
was still ignoring the blocktype 'text' and so was not updating the
view_access rules for that

- need to add a sql query to find these non-artefact items we want to
index and them to the queue also

3) Deleting of all the view_access rules for a page was not being picked up and so items
were not being re-indexed

- need to add items to queue when all access rules are removed from a view
[this is not a problem if rules are changed as we delete all rules and add in new ones so can be picked up by change for (1) where we look for new access rules]

** Affects: mahara
     Importance: High
     Assignee: Robert Lyon (robertl-9)
         Status: In Progress

** Affects: mahara/16.10
     Importance: High
         Status: In Progress

** Affects: mahara/17.04
     Importance: High
         Status: In Progress

** Affects: mahara/17.10
     Importance: High
         Status: In Progress

** Affects: mahara/18.04
     Importance: High
     Assignee: Robert Lyon (robertl-9)
         Status: In Progress

** Changed in: mahara
   Importance: Undecided => High

** Changed in: mahara
       Status: New => In Progress

** Changed in: mahara
     Assignee: (unassigned) => Robert Lyon (robertl-9)

** Changed in: mahara
    Milestone: None => 18.04.0

** Also affects: mahara/16.10
   Importance: Undecided
       Status: New

** Also affects: mahara/18.04
   Importance: High
     Assignee: Robert Lyon (robertl-9)
       Status: In Progress

** Also affects: mahara/17.04
   Importance: Undecided
       Status: New

** Also affects: mahara/17.10
   Importance: Undecided
       Status: New

** Changed in: mahara/17.10
    Milestone: None => 17.10.2

** Changed in: mahara/17.04
    Milestone: None => 17.04.5

** Changed in: mahara/16.10
    Milestone: None => 16.10.7

** Changed in: mahara/17.10
   Importance: Undecided => High

** Changed in: mahara/17.04
   Importance: Undecided => High

** Changed in: mahara/16.10
   Importance: Undecided => High

** Changed in: mahara/17.10
       Status: New => In Progress

** Changed in: mahara/17.04
       Status: New => In Progress

** Changed in: mahara/16.10
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1738898

Title:
  Elasticsearch not updating indexed items when access rules change

Status in Mahara:
  In Progress
Status in Mahara 16.10 series:
  In Progress
Status in Mahara 17.04 series:
  In Progress
Status in Mahara 17.10 series:
  In Progress
Status in Mahara 18.04 series:
  In Progress

Bug description:
  When a page has it's access rules changed (but not other editing) the
  elasticsearch does not update the index for the items involved.

  There is an add_to_queue_access() function that is meant to check what
  pages have had their access changed since they were indexed. It was
  designed to catch the pages which have a start/stop date.

  But that is not quite sufficient.

  Problems:
  1) If a page is indexed and then later it's access rules are changed the page and it;s artefacts/blocks were not getting re-indexed to reflect the rule change

  - need the add_to_queue_access() a check for view_access rows whose
  'ctime' value is within the range being checked.

  2) If a page did get found with the add_to_queue_access() function it
  was still ignoring the blocktype 'text' and so was not updating the
  view_access rules for that

  - need to add a sql query to find these non-artefact items we want to
  index and them to the queue also

  3) Deleting of all the view_access rules for a page was not being picked up and so items
  were not being re-indexed

  - need to add items to queue when all access rules are removed from a view
  [this is not a problem if rules are changed as we delete all rules and add in new ones so can be picked up by change for (1) where we look for new access rules]

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1738898/+subscriptions


Follow ups