2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-01 09:31:34 +00:00

Merge branch 'master' of https://github.com/inventree/InvenTree into plugin-2037

This commit is contained in:
Matthias
2021-10-12 22:23:45 +02:00
65 changed files with 31335 additions and 27922 deletions

@@ -67,7 +67,12 @@ class RuleSet(models.Model):
'report_billofmaterialsreport',
'report_purchaseorderreport',
'report_salesorderreport',
'account_emailaddress',
'account_emailconfirmation',
'sites_site',
'socialaccount_socialaccount',
'socialaccount_socialapp',
'socialaccount_socialtoken',
],
'part_category': [
'part_partcategory',
@@ -213,7 +218,10 @@ class RuleSet(models.Model):
return True
# Print message instead of throwing an error
logger.info(f"User '{user.name}' failed permission check for {table}.{permission}")
name = getattr(user, 'name', user.pk)
logger.info(f"User '{name}' failed permission check for {table}.{permission}")
return False
@staticmethod