milesrichardson / ParsePy

A relatively up-to-date fork of ParsePy, the Python wrapper for the Parse.com API. Originally maintained by @dgrtwo
MIT License
516 stars 184 forks source link

save User using master key #129

Open yangqch opened 9 years ago

yangqch commented 9 years ago

When running server side background job, it is common to modify and save User attributes. Usually, with master_key registered, it should be no problem to run user.save() even if the program is not run by the logged in user.

However, in current version, it failed for "save requires a logged-in session" Error. It is caused by the decorator "login_required" on the "save()" function in User class. It will be helpful to check master key when login_required is not satisfied.

wdyt?

yangqch commented 9 years ago

we already have "master_key_required" defined but not used anywhere.

yangqch commented 9 years ago

oh, I just found a very hacky way to "solve" this problem. set user.sessionToken=something can just cheat the login_required() to pass.

I hope we can find a more formal way to achieve this.

maplethorpej commented 8 years ago

I'm running into the same issue. Hoping to have a resolution here.