Commit c195adf1 authored by Romain Courteaud's avatar Romain Courteaud

slapos_erp5: XXX drop allocation related role definition

public is not a goal anymore.

subscription leads to all machine being available to all users, even if their subscription request is unrelated
parent 6129df7d
...@@ -15,6 +15,7 @@ compute_node = obj ...@@ -15,6 +15,7 @@ compute_node = obj
category_list = [] category_list = []
"""
scope = compute_node.getAllocationScope() scope = compute_node.getAllocationScope()
if scope == 'open/public': if scope == 'open/public':
return {"Auditor": ["R-SHADOW-PERSON"]} return {"Auditor": ["R-SHADOW-PERSON"]}
...@@ -24,9 +25,6 @@ elif scope == 'open/personal': ...@@ -24,9 +25,6 @@ elif scope == 'open/personal':
person = compute_node.getSourceAdministrationValue(portal_type="Person") person = compute_node.getSourceAdministrationValue(portal_type="Person")
if person is not None: if person is not None:
return {"Auditor": ["SHADOW-%s" % person.getUserId()]} return {"Auditor": ["SHADOW-%s" % person.getUserId()]}
elif scope == 'open/friend': """
person_list = compute_node.getDestinationSectionValueList(portal_type="Person")
if person_list:
return {"Auditor": ["SHADOW-%s" % x.getUserId() for x in person_list]}
return category_list return category_list
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