parse.com - How to check admin login in the app using parse? [iOS] -


who has understood how check @ entrance user application administrator rights? [ios] in parse documentation mentioned how create pfrole:

pfrole *role = [pfrole rolewithname:@"administrator" acl:roleacl]; [role saveinbackground]; 

you can query roles particular user has been assigned for. can way.

pfquery query = [pfrole query]; [query wherekey:@"users" equalto:user];  [query findobjectsinbackgroundwithblock:(nsarray *objects, nserror *error) {  // list of roles user has been assigned , check if user has been assigned administrator }]; 

Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -