Commit 5f4321c3 authored by Łukasz Nowak's avatar Łukasz Nowak

Drop not needed categories.

role provides no group.
parent c30b6af2
...@@ -49,7 +49,7 @@ def getComputerSecurityCategory(self, base_category_list, user_name, ...@@ -49,7 +49,7 @@ def getComputerSecurityCategory(self, base_category_list, user_name,
for base_category in base_category_list: for base_category in base_category_list:
if base_category == "role": if base_category == "role":
category_list.append( category_list.append(
{base_category: ['role', 'role/computer']}) {base_category: ['role/computer']})
elif len(computer_list) > 1: elif len(computer_list) > 1:
raise ConsistencyError, "Error: There is more than one Computer " \ raise ConsistencyError, "Error: There is more than one Computer " \
"with reference '%s'" % user_name "with reference '%s'" % user_name
...@@ -75,7 +75,7 @@ def getSoftwareInstanceSecurityCategory(self, base_category_list, user_name, ...@@ -75,7 +75,7 @@ def getSoftwareInstanceSecurityCategory(self, base_category_list, user_name,
category_dict = {} category_dict = {}
for base_category in base_category_list: for base_category in base_category_list:
if base_category == "role": if base_category == "role":
category_dict.setdefault(base_category, []).extend(['role', 'role/instance']) category_dict.setdefault(base_category, []).extend(['role/instance'])
if base_category == "aggregate": if base_category == "aggregate":
software_instance = software_instance_list[0] software_instance = software_instance_list[0]
hosting_item = software_instance.getSpecialiseValue(portal_type='Hosting Subscription') hosting_item = software_instance.getSpecialiseValue(portal_type='Hosting Subscription')
......
221 222
\ No newline at end of file \ No newline at end of file
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