mirror of
https://github.com/inventree/InvenTree.git
synced 2025-09-17 08:01:33 +00:00
Merge branch 'master' of https://github.com/inventree/InvenTree into plugin-2037
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user