Skip to content

Read projection will never fire allowRead('projection') #8

@IAkumaI

Description

@IAkumaI

Read projection will never fire allowRead('projection')

// posts - is real collection
backend.addProjection('posts_projection', 'posts', {id: true, title: true});

backend.allowRead('posts', async (docId, doc, session) => {
  // Read posts_projection will fire this callback
  return true;
});

backend.allowRead('posts_projection', async (docId, doc, session) => {
  // We will never reach here and is still possible to read posts_projection
  return false;
});

In derbyjs-app:

 model.query('posts_users', {}); // Will fire allowRead('posts') instead of allowRead('posts_projection'), but this is wrong

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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