1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-01 07:35:57 +09:00

アカウントを凍結されていたらAPIにアクセスできないようにした

This commit is contained in:
syuilo 2018-07-13 23:44:45 +09:00
parent 2db01f3d5c
commit 2bc572b4cc

View File

@ -17,6 +17,10 @@ export default (endpoint: string | Endpoint, user: IUser, app: IApp, data: any,
return rej('SIGNIN_REQUIRED'); return rej('SIGNIN_REQUIRED');
} }
if (ep.withCredential && user.isSuspended) {
return rej('YOUR_ACCOUNT_HAS_BEEN_SUSPENDED');
}
if (app && ep.kind) { if (app && ep.kind) {
if (!app.permission.some(p => p === ep.kind)) { if (!app.permission.some(p => p === ep.kind)) {
return rej('PERMISSION_DENIED'); return rej('PERMISSION_DENIED');