Kaynağa Gözat

only admin and owner can delete app (#810)

tags/0.3.13
conghaoyuan 2 yıl önce
ebeveyn
işleme
c13a90ee69
No account linked to committer's email address
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4
    0
      api/controllers/console/app/app.py

+ 4
- 0
api/controllers/console/app/app.py Dosyayı Görüntüle

@@ -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)

Loading…
İptal
Kaydet