Getting YAML front matter data into an API

I'm writing an API to use with _protect that will check the users returned account against a YAML list provided in the page's front matter.

For example, in my "beta feature" page I have this YAML:

  - abc
  - def
  - ghi

My protect statement looks like this:

      method: 'labs:account'
      comparison: '='
      value: 1

The account method will use our API to find the users account. If the returned account matches the passed list, it will return 1, if access.

My quyestion is:

How can I get the accounts list from the page for each page on which the labs:account method is being called?

Answered by Jason Varga!
>>>>>>> Answered <<<<<<<
2 Replies