SkygearIO / skygear-SDK-JS

Skygear SDK for JavaScript
https://docs.skygear.io/guides/quickstart/js/
Other
23 stars 33 forks source link

[Cloud Code] Support role-based access control in lambda / handler #198

Open akiroz opened 7 years ago

akiroz commented 7 years ago

Right now lambda / handler access can only be controlled using authRequired and userRequired. It would be nice to be able to control access by user role just like records.

cheungpat commented 7 years ago

I just want to add that this feature requires support from skygear-server.

akiroz commented 7 years ago

Couldn't we just query the _user_role table from the plugin?

cheungpat commented 7 years ago

Couldn't we just query the _user_role table from the plugin?

Yes, but that would break the current separation between plugin and server. For example, if we implement it in the plugin side, the python cloud code would not support this feature.

This feature requires some design. Could you add this to SkygearIO/features where this feature will get more focus.