Quantcast
Channel: Web services
Viewing all articles
Browse latest Browse all 2362

Permissions not working as expected through REST API

$
0
0
by Pratik Sathaye.  

Hi,

I am trying to use REST API to create users in Moodle.

I am getting token for a user which has "Student" role from below URL and able to get that token

http://yourdomain.com/moodle/login/token.php/?username=teststudent&password=blahblahblah&service=TEST_SERVICE


and now I am trying to create user through this token 

http://54.191.197.43/moodle/webservice/rest/server.php/?token=mytoken&wsfunction=moodle_user_create_user

but it still allows me to create user even if I set "Prohibit" for create user permission for "Student" role.

Can someone help me with this ?

Why permission check is not happening in this scenario ?


Viewing all articles
Browse latest Browse all 2362

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>