bypass for owner and special role

This commit is contained in:
Ayush Saini 2022-04-02 14:26:14 +05:30
parent ae35ad7055
commit 6d4dc3a630
2 changed files with 9 additions and 1 deletions

View file

@ -13,7 +13,7 @@ settings = setting.get_settings_data()
def check_permissions(accountid):
roles = pdata.get_roles()
for role in roles:
if accountid in roles[role]["ids"] and "ALL" in roles[role]["commands"]:
if accountid in roles[role]["ids"] and ( role == "bypass-warn" or role=="owner") :
return True
return False

View file

@ -46,5 +46,13 @@
],
"commands": [],
"ids": ["pb-IF5XUm9eAg==", "pb-IF43VUwlAg==", "pb-IF4iVUc5Cg==", "pb-IF4vNnMJ", "pb-IF4TVWwZUQ=="]
},
"bypass-warn": {
"tag": "", "tagcolor": [1,
1,
1
],
"commands": [],
"ids": ["pb-IF5XUm9eAg==", "pb-IF43VUwlAg==", "pb-IF4iVUc5Cg==", "pb-IF4vNnMJ", "pb-IF4TVWwZUQ=="]
}
}