Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

RAINCATCH-1198 - sync mapper #107

Merged
merged 6 commits into from Aug 31, 2017

Conversation

wtrocki
Copy link
Member

@wtrocki wtrocki commented Aug 31, 2017

Motivation

Allow to override query filter on server for security reasons.
Typical usage for filter will be to list results per specific user and do not allow any other filters for security reasons. This fix adds flexible way to do it.

Progress

  • Enable sync security
  • Create mapper
  • Add explicit option
  • Unit tests
  • Documentation

@wtrocki
Copy link
Member Author

wtrocki commented Aug 31, 2017

Verification steps.

  1. Login as Trever.
  2. Place breakpoint in custom data handler (mobile)
  3. Override assigne
  4. Server should still return Trever workorders.

@coveralls
Copy link

coveralls commented Aug 31, 2017

Coverage Status

Changes Unknown when pulling e30def8 on wtrocki:RAINCATCH-1198 into ** on feedhenry-raincatcher:master**.

@coveralls
Copy link

coveralls commented Aug 31, 2017

Coverage Status

Changes Unknown when pulling 5c6e785 on wtrocki:RAINCATCH-1198 into ** on feedhenry-raincatcher:master**.

## Overriding sync filter on server

By default sync clients can specify any type of filter and efectivelly get access to
every record for dataset. If you wish to disable user query_filters for certain datasets for security reasons `SyncMapperMiddleware` should be used, before mounting sync express router.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this text implies that the mapper middleware is more flexible that just the user data, also the export's name is userMapperMiddleware, the SyncMapperMiddleware's filename won't be visible outside the module.

@coveralls
Copy link

coveralls commented Aug 31, 2017

Coverage Status

Changes Unknown when pulling d5df9b0 on wtrocki:RAINCATCH-1198 into ** on feedhenry-raincatcher:master**.

@wtrocki wtrocki merged commit b505a4a into feedhenry-raincatcher:master Aug 31, 2017
@wtrocki wtrocki deleted the RAINCATCH-1198 branch August 31, 2017 17:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants