Kaynağa Gözat

fix: bypass admin users to use dataset api with API key (#2072)

tags/0.4.9
Bowen Liang 1 yıl önce
ebeveyn
işleme
e2c89a9487
No account linked to committer's email address
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1
    1
      api/controllers/service_api/wraps.py

+ 1
- 1
api/controllers/service_api/wraps.py Dosyayı Görüntüle

@@ -75,7 +75,7 @@ def validate_dataset_token(view=None):
tenant_account_join = db.session.query(Tenant, TenantAccountJoin) \
.filter(Tenant.id == api_token.tenant_id) \
.filter(TenantAccountJoin.tenant_id == Tenant.id) \
.filter(TenantAccountJoin.role == 'owner') \
.filter(TenantAccountJoin.role.in_(['owner', 'admin'])) \
.one_or_none()
if tenant_account_join:
tenant, ta = tenant_account_join

Loading…
İptal
Kaydet