Unverified Commit c13a90ee authored by conghaoyuan's avatar conghaoyuan Committed by GitHub

only admin and owner can delete app (#810)

parent 5a7b51f8
......@@ -294,6 +294,10 @@ class AppApi(Resource):
def delete(self, app_id):
"""Delete app"""
app_id = str(app_id)
if current_user.current_tenant.current_role not in ['admin', 'owner']:
raise Forbidden()
app = _get_app(app_id, current_user.current_tenant_id)
db.session.delete(app)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment