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
Post a Comment