Skip to content

Allow select (keys) to be altered in beforeFind hook #3145

Closed
@acinader

Description

@acinader

Any changes to the select value of a query (i.e. what fields to return) are ignored in the beforeFind hook.

The backstory on this change: If a call is made to classes/_Users, the returned object contains sensitive info, i.e. email addresses that should not be able to be retrieved without the master key (or by the user herself on her own record.)

So there may be a better way to solve this problem (I'm all ears!), but my solution was to use a beforeFind hook and only select non-sensitive fields (a little simplified, but you get the idea).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions