-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Adds CloudCode handler for beforeFind #2715
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
Conversation
flovilmart
commented
Sep 15, 2016
- Allows cloud code to modify a query before it is run
- Works with promises for a safer environment
- Supports modifiying the current query
- Supports issuing new queries
- Supports rejecting queries
- Allows cloud code to modify a query before it is run - Works with promises for a safer environment - Supports modifiying the current query - Supports issuing new queries
Current coverage is 92.19% (diff: 93.24%)@@ master #2715 diff @@
==========================================
Files 102 102
Lines 12446 12522 +76
Methods 1559 1566 +7
Messages 0 0
Branches 2039 2060 +21
==========================================
+ Hits 11478 11545 +67
- Misses 968 977 +9
Partials 0 0
|
@flovilmart updated the pull request - view changes |
@flovilmart updated the pull request - view changes |
Can you add some docs for this feature as well? |
I'll add it to the docs repo :) |
Looks good. |
Current ACL implementation is very limited. For example there's no easy way to grant access dynamically using some logic. It's possible to work around this using cloud code, but it's not optimal. |
What do you mean by more powerful hooks? |
Sometimes there's need to grant additional access effectively disabling built-in ACLs checks. For example imagine team record. There's a team owner who has access to the team. Now he invites team member who can for example have read-only access to team data (and potentially access can be revoked). Updating ACLs (adding member user) is not an option as there can be many-many thousands of objects. For now I have to write cloud function that uses |
@virtualtoy you're talking about roles there and class level permissions probably. |
@flovilmart so you suggest creating new roles for different groups of objects? |
You should assign a role in the ACL for the objects, then add the users for that role. When you want to remove access to those objects for certain users, you can simply remove the user from the role. |
@flovilmart thank you for suggestion, yes, I'm aware of roles, but that's not flexible enough for me |