Open yangqch opened 9 years ago
we already have "master_key_required" defined but not used anywhere.
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.
I'm running into the same issue. Hoping to have a resolution here.
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?