Closed mordae closed 8 years ago
I thought that in this case the incoming messages won't be available. I think, for your case need to create new ADMIN_ACCOUNTS variable:
if result['From'] == auth.username() or auth.username() in current_app.config['ADMIN_ACCOUNTS']:
return jsonify(result)
else:
return forbidden(None)
In our use case, we provide access to smstools api and users from our company can send sms (monitoring, CI, etc). But we don't want if messages are read by other users.
Why don't you write sms data to the database from smstools api? It's easier.
Perhaps, but smstools-http-api
is a nice fit for our library system already and the auditing app is nicely decoupled from it.
Now I add options ADMIN_ACCOUNTS for fix this issue.
Hi, I had to remove this check in our fork because:
From
field indicating sender's phone number.What is your use-case?