Browse code

Merge pull request #973 from mcv21/nulldisplay

Allow setting full_control on objects with public read access

Florent Viard authored on 2018/06/04 00:30:39
Showing 1 changed files
... ...
@@ -186,9 +186,9 @@ class ACL(object):
186 186
         permission = permission.upper()
187 187
 
188 188
         if "ALL" == permission:
189
-            self.grantees = [g for g in self.grantees if not (g.name.lower() == name or g.display_name.lower() == name)]
189
+            self.grantees = [g for g in self.grantees if not (g.name.lower() == name or (g.display_name is not None and g.display_name.lower() == name))]
190 190
         else:
191
-            self.grantees = [g for g in self.grantees if not ((g.display_name.lower() == name or g.name.lower() == name)
191
+            self.grantees = [g for g in self.grantees if not (((g.display_name is not None and g.display_name.lower() == name) or g.name.lower() == name)
192 192
                 and g.permission.upper() == permission)]
193 193
 
194 194
     def get_printable_tree(self):