Commit a4e7b8f1 authored by Jim Fulton's avatar Jim Fulton

Simplified some logic. We bothered to reset the name variable to

string roles only of the values were different. This was a needless
optimization. Then we preceeded to reset the roles value even though
it wasn't used again.
parent da49e504
...@@ -68,11 +68,7 @@ def rolesForPermissionOn(perm, object, default=_default_roles, n=None): ...@@ -68,11 +68,7 @@ def rolesForPermissionOn(perm, object, default=_default_roles, n=None):
# with the new permission name. If the permission # with the new permission name. If the permission
# name is '', then treat as private! # name is '', then treat as private!
if roles: if roles:
if roles != n: n = roles
n = roles
# If we find a name that is the same as the
# current name, we just ignore it.
roles = None
else: else:
return _what_not_even_god_should_do return _what_not_even_god_should_do
......
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