Commit d9e0b663 authored by Aurel's avatar Aurel

if a permission is defined on portal type, test only this permission and

not the factory method


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20932 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6ab68d80
...@@ -235,8 +235,11 @@ class ERP5TypeInformation( FactoryTypeInformation, ...@@ -235,8 +235,11 @@ class ERP5TypeInformation( FactoryTypeInformation,
# validate() can either raise Unauthorized or return 0 to # validate() can either raise Unauthorized or return 0 to
# mean unauthorized. # mean unauthorized.
permission = self.permission permission = self.permission
if permission and _checkPermission(permission, container): if permission:
return m if _checkPermission(permission, container):
return m
else:
return default
elif getSecurityManager().validate(p, p, self.factory, m): elif getSecurityManager().validate(p, p, self.factory, m):
return m return m
except zExceptions_Unauthorized: # Catch *all* Unauths! except zExceptions_Unauthorized: # Catch *all* Unauths!
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment