Correct use of roles to see all User's emails?

Hi there!

We’re building an admin dashboard for one of our apps. We’d like to export a CSV of all users, and that involves getting all users and having their emails present.

By default they’re not - fair enough.

However, we’re trying to use roles and CLPs/ACLs to expose this to a logged in Parse user with an “admin” role. However, nothing we’re trying is working.

We have

  • A role with two users in it, deemed to be admin
  • a CLP on User, giving full read/write to that role
  • (as a test) some ACLs on some users giving the role full read/write

What we get:

  • All users are loaded, but only email for the logged in user (passing in session token on the query.find())

So: Is this possible with ACLs/CLPs? Seems not so far.
What other options do I have? If I have to use master key, then I guess I could put some code in the cloud to work around this.

Thanks!
Sam

Yes. I think you will have to use master key via cloud code to retrieve the e-mails.