CodeIgniter Forums
REST_Controller - limits & levels? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7)
+--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13)
+--- Thread: REST_Controller - limits & levels? (/showthread.php?tid=71099)



REST_Controller - limits & levels? - regjel - 07-06-2018

Can someone give me a brief explanation how the limits and levels features of the REST_Controller work?

Do you only set the level requirements manually inside individual controllers? Or are they something to do with the all_access column in auth_access?

Thanks.


RE: REST_Controller - limits & levels? - enlivenapp - 07-06-2018

Levels are basically permissions. So you would check that the API Key/User has permission (correct level) to perform that particular method (or even in the entire class).
The default level is 1 (or 0, I'd have to look at the code again) but if you're not actively setting levels, the library assumes you're not using permissions and sets it to something low.

Limits are the number of calls which can be called on a method in an hour.