Skip to content

Commit 051423c

Browse files
authored
fixed NoACLs (#266)
1 parent f999df1 commit 051423c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

cterasdk/core/cloudfs.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,18 @@ def add(self, name, group, owner, winacls=True, description=None, quota=None, co
161161
if description:
162162
param.description = description
163163
param.wormSettings = compliance_settings if compliance_settings else ComplianceSettingsBuilder.default().build()
164-
param.extendedAttributes = xattrs if xattrs else ExtendedAttributesBuilder.default().build()
164+
if xattrs:
165+
param.extendedAttributes = xattrs
166+
elif not winacls: # Only override default when winacls is False
167+
param.extendedAttributes = Object()
168+
param.extendedAttributes._classname = 'ExtendedAttributes' # pylint: disable=protected-access
169+
param.extendedAttributes.enable = False
170+
param.extendedAttributes.attributes = [Object()]
171+
param.extendedAttributes.attributes[0]._classname = 'ExtendedAttributesInfo' # pylint: disable=protected-access
172+
param.extendedAttributes.attributes[0].name = 'MacOS'
173+
param.extendedAttributes.attributes[0].supported = True
174+
else:
175+
param.extendedAttributes = ExtendedAttributesBuilder.default().build()
165176

166177
try:
167178
response = self._core.api.execute('', 'addCloudDrive', param)

0 commit comments

Comments
 (0)