Greetings, Captain!
I'll look into the proper solutions to your concerns.
But first, let me just focus on details:
- You might return the Promises to properly fit them on the ".then()" chain.
"role.save(null, {useMasterKey: true});" might become "return role.save(null, {useMasterKey: true});".
Same with "user.save()".
- I'll recommend the usage of "query = new Parse.Query(Parse.Role);" instead of "query = new Parse.Query("_Role");".
I still need to check another changes on the code, but this might be a good start.
Permission to leave, Captain? Aye aye!
Ricardo "Parrotless" Seiji.