You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the ability package expects the data model to be structure as mongoose structure. But it would be practical if it were possible to specify the data fields (ie _id, name, ownerId...), then in another field specify which data structure it's referring to.
Or perhaps use an "alias" field in the data context in react for example.
My current workaround on the casl-react lib is to augment the data passed to the Can component:
Currently, the ability package expects the data model to be structure as mongoose structure. But it would be practical if it were possible to specify the data fields (ie
_id
,name
,ownerId
...), then in another field specify which data structure it's referring to.Or perhaps use an "alias" field in the data context in react for example.
My current workaround on the casl-react lib is to augment the data passed to the
Can
component:<Can I="update" this={{...data, constructor: {name : "MyStruc" }}} > {...}</Can>
But this isn't very elegant. Or am I missing something.
The text was updated successfully, but these errors were encountered: