Banned users env, access validator, removed silent command, code quality improvements

This commit is contained in:
miloszowi
2021-10-08 15:25:47 +02:00
parent d05d0c0904
commit 431b004284
28 changed files with 268 additions and 261 deletions

View File

@@ -0,0 +1,10 @@
from config.credentials import BANNED_USERS
from exception.actionNotAllowedException import ActionNotAllowedException
class AccessValidator:
@staticmethod
def validate(user_id: str) -> None:
if user_id in BANNED_USERS:
raise ActionNotAllowedException('You are banned')