Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apiRequireId returns 403 when using relation #290

Open
mihaa1 opened this issue Nov 16, 2023 · 1 comment
Open

apiRequireId returns 403 when using relation #290

mihaa1 opened this issue Nov 16, 2023 · 1 comment

Comments

@mihaa1
Copy link

mihaa1 commented Nov 16, 2023

Description:
When trying to load entities through a relation, and defining apiRequireId:true on the entity loaded it returns 403 forbidden.

Reproduce:

  1. Create User - User-X-Order - Order many-to many relation
  2. add apiRequireId: true to User entity
  3. loading orders with users doesn't work
    await remult.repo(Order).find({include: { users: true }})
    will return 403

Expected behavior:
Users are loaded on each order

@noam-honig
Copy link
Collaborator

I think it's fixed, check out version 0.23.0-exp.25

noam-honig added a commit that referenced this issue Dec 11, 2023
* start work on relations

* Json db doesn't respect `dbName` option on field #72

* many to one based on it's own field - implemented

* a few more tests

* fixed another test

* Fixed test

* Moved Fields to a separate file

* helped support update etc... with many to one

* one to many started working

* added repository insert, count and find

* Added failing test

* added more testsw

* cleaned up tests

* replaced match with field

* removed limit from that api

* inherited from field options

* refactored to use regular repositories

* fixed test

* fixed include of many to one relation

* fixed to respect auto include and override

* fixed null etc

* fixed update

* made sure we get id

* included include in to and from json

* started

* refactored

* 🛑 added field reference and removed first parameter

* basic optimization

* progress on optimization

* more work on optimizations

* handled recursion fetch

* stabilized optimization

* more todos

* added internal export and fixed some typing and added types to index

* release 0.22.9-exp.0

* set new version number

* live query basics work

* added support for load in active record

* release 0.23.0-exp.1

* optional types options

* release 0.23.0-exp.2

* added support for query

* fixed load issue with older fileds

* fixed optional relation field issue

* more fixes

* improved typing

* more work on todo

* git this test to work

* more progress

* new way of defining id columns

* Added lifecycle events

* improved lifecycle events

* made second parameter for one mandatory

* Added thoughts

* made one work like reference

* merged reference with one

* renamed fields to relations

* release 0.23.0-exp.3

* updated changelog

* fixed readme

* release 0.23.0-exp.4

* more fix readme

* release 0.23.0-exp.5

* more tests

* release 0.23.0-exp.6

* mre readme work

* release 0.23.0-exp.7

* fixed readme

* saving row moved to backend

* Made progress on typing

* more typing work

* more typing

* fixed auto many to one relation - and exposed class type

* release 0.23.0-exp.8

* reduced in with one value to eq

* release 0.23.0-exp.9

* fixed relation bug

* release 0.23.0-exp.10

* fixed issue with sort

* release 0.23.0-exp.11

* Strip out "toMany" from GraphQL for now (#253)

* 🐛 FIX: strip out toMany from GraphQL for now

* 👌 FIX: code style

* more todo

* another exp

* release 0.23.0-exp.12

* 4564

* house keeping

* updated more stuff

* improved todo icons

* give error on missing field

* fixed lazy typing etc...

* a little more homework

* fixed toRawFilter

* fixed extra info on options

* release 0.23.0-exp.13

* fixed test

* release 0.23.0-exp.14

* update changelog

* stam commit

* Fixed typing issue

* release 0.23.0-exp.15

* Entity relations doc

* updated docs

* fixed index

* updated script

* 🚸 UPDATE: a few tweaks (#266)

* 🚸 UPDATE: a few tweaks

* Minor adjustments

* Item C

* applied JY comments

---------

Co-authored-by: Noam Honig <noam.honig@gmail.com>

* Fixed issue with updating of and related columns race

* release 0.23.0-exp.16

* Another null issue

* release 0.23.0-exp.17

* fixed another null issue

* release 0.23.0-exp.18

* Fixed typedoc markdown

* Updated docs

* minor doc update

* added comments

* udpated todo

* fixed included in api to be an expression

* fix

* release 0.23.0-exp.19

* fix sort

* release 0.23.0-exp.20

* fixed sort

* Fixed sort issue

* release 0.23.0-exp.21

* one more todo comment

* fixed compound id for svelte and added with remult

* release 0.23.0-exp.22

* one more minor issue

* release 0.23.0-exp.23

* 🎉 NEW: add offset arg in graphql on connection (#280)

* updates sveletkit tests

* release 0.23.0-exp.24

* more todos

* docs

* ⚡ NEW: ensure working also on non public schema (#288)

* apiRequireId returns 403 when using in Statement  #290

* release 0.23.0-exp.25

* fixed it only tests

* release 0.23.0-exp.26

* more notes

* Fixed equal to null issue

* release 0.23.0-exp.27

* More work

* updated todo

* ok

* More notes

* release 0.23.0-exp.28

* todo

* release 0.23.0-exp.29

* fixed update bug with compound id

* release 0.23.0-exp.30

* Fixed comment

* added lifecycle event to index

* release 0.23.0-exp.31

* update topics

* םל

* stabilized it

* added relations to docs

* another note

* todo

* fixed saving on field options

* added something interesting

* Removed use cache as default for findid

* Fixed typing issue

* Fixed db name

* updated todo

* update minor mongo db version

* update sqlite version

* fixed relation on change

* more progress

* more fix to todo

* fixed relation auto removal of data

* release 0.23.0-exp.32

* remult hapi supports crud

* updated the todo

* fixed a typing build error

* removed functions for fields etc...

* release 0.23.0-exp.33

* reverted omit functions

* release 0.23.0-exp.34

* Added hapi to change log and docs

* ok

* autocomplete with Relation.toOne

* demo problem

* compared api

* OmitFunctions

* TS hack for $ and _

* OmitFunctions

* aligned MembersOnly

* fixed package json

* release 0.23.0-exp.35

* Another note

* updated todo

* fixed _ $

* fixed null issue

* updated build

* release 0.23.0-exp.36

* finalized types

* release 0.23.0-exp.37

* fixed members only to exclude entity base

* release 0.23.0-exp.38

---------

Co-authored-by: JYC <jycouet@gmail.com>
Co-authored-by: Yoni Rapoport <yoni@fireflymigration.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants