angularfire icon indicating copy to clipboard operation
angularfire copied to clipboard

the resource.data is not working to angularfire v9

Open AdamTeodoro opened this issue 4 years ago • 10 comments
trafficstars

The rule that use resource.data is not working to angularfire V9

AdamTeodoro avatar Nov 09 '21 22:11 AdamTeodoro

This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Nov 09 '21 22:11 google-oss-bot

they wouldn't solve it even if I had followed the rules for publishing problems kkkkkk, but at least that way I complain and don't waste time typing too much

AdamTeodoro avatar Nov 09 '21 22:11 AdamTeodoro

@AdamTeodoro are you talking about security rules?

jamesdaniels avatar Nov 10 '21 06:11 jamesdaniels

I understand you're frustrated but please be mindful of the Code of Conduct. We're volunteers here & we have competing demands for our attention.

jamesdaniels avatar Nov 10 '21 06:11 jamesdaniels

This is not frustrating for me, i 'm sorry the problem is very visible i'm commit for see if devs are update about this problem, without more explications.

Is this one básic use: look my project

the timestamp is not working:

This rule is notworking with angularfirev9: my angular code: my component: https://github.com/AdamTeodoro/AdamTeodoro/tree/master/src/app/components/commit my angualar service: https://github.com/AdamTeodoro/AdamTeodoro/blob/master/src/app/services/commit.service.ts my rule request.time > resource.data.timestamp + duration.value(2, 's');

my angular code: https://github.com/AdamTeodoro/AdamTeodoro/blob/master/src/app/app.component.ts my rule: resource.data.accesses + 1 == request.resource.data.accesses;

AdamTeodoro avatar Nov 11 '21 14:11 AdamTeodoro

i'm sorry for my inglish, and thanks for your service and for your patience.

AdamTeodoro avatar Nov 11 '21 15:11 AdamTeodoro

I'm not sure what you're trying to achieve with that security rule, that 2 seconds must have elapsed from the time that the data was saved? Since you're using server time it strikes me that would be expected to fail. Are you trying to rate limit?

jamesdaniels avatar Nov 11 '21 19:11 jamesdaniels

yes, the first rule is to limit access, forcing the user to wait seconds to perform a new access. The second rule is to limit the number of increments per access, for each access to increment only once. These rules are working in the previous version.

AdamTeodoro avatar Nov 15 '21 19:11 AdamTeodoro

Me desculpe pela demora durante esses quatro dias eu estava dormindo.

AdamTeodoro avatar Nov 15 '21 19:11 AdamTeodoro

I'm reading other cases and the problem could be that I'm using set and not update.

AdamTeodoro avatar Nov 23 '21 13:11 AdamTeodoro