Brad Fair
Brad Fair

Reputation: 967

Hiding results from Admin in Structr

I'm building an interface where I see a list of items. As an admin, I see everyone's items. This clutters up the drag and drop Pages interface. This is the query I use to list items:

sort(find('Item'), 'due')

How do I limit this to just the logged in user's items?

Upvotes: 1

Views: 54

Answers (1)

Christian Morgner
Christian Morgner

Reputation: 319

You can use something like this:

sort(find('Item', 'owner', me), 'due')

or

filter(sort(find('Item'), 'due'), eq(data.owner, me))

Upvotes: 2

Related Questions