Skip to content

Scheduled triggers with run_as_system: true do not set context.user.type to "system" #80

Description

Hello,

We've discovered another difference from Realm regarding the context.user data.
When a scheduled trigger invokes a function with system privileges:

For Realm: context.user.type is "system".
For Flowerbase context.user is an empty object.

As a result, this condition worked in Realm for scheduled triggers

if (context.user && context.user.type !== "system" && !context.user.custom_data) { ... }

In flowerbase this leads to an error because there is a context.user but no context.user.custom_data.

That's not a big deal, just a minor discrepancy

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions