Element level security

In our solution we are using element level security using setSecuritySettings (see example code). Problem we encounter is that when an element is set to readonly-access it remains readonly also when the form is put in find-mode. In this way we cannot search on this element.

Would you say this is expected behaviour or should this be considered a bug? Anyone already made a work-around for this and what would be a nice work-around (f.e. extra element that is shown when form is put in find mode)?

Example code:

var colNames = new Array()
colNames[0] = 'uuid'
colNames[1] = 'flags'
var dataset = databaseManager.createEmptyDataSet(0,colNames)
var row = new Array()
row[0] = '413a4d69-becb-4ae4-8fdd-980755d6a7fb' // element uuid
row[1] = JSSecurity.VIEWABLE
dataset.addRow(row)
security.setSecuritySettings(dataset)

Either element level security using security.setSecuritySettings or controller.find/search is not used too often by people in this forum… :?

Created a case (Jira). I would say it’s a bug, let’s see what Servoy says