Commit 614ac5e4 authored by Jérome Perrin's avatar Jérome Perrin

base: don't acquire local role on File

File is a top-level module document, like PDF, Text Document etc, so it
should have its own security definition and should not acquire local roles.

For cases where files are embedded as sub documents, we are using Embedded
File, which acquire local roles.
parent fdde9b45
Pipeline #13854 failed with stage
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
</item> </item>
<item> <item>
<key> <string>acquire_local_roles</string> </key> <key> <string>acquire_local_roles</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>content_icon</string> </key> <key> <string>content_icon</string> </key>
......
...@@ -1722,9 +1722,9 @@ class TestDocument(TestDocumentMixin): ...@@ -1722,9 +1722,9 @@ class TestDocument(TestDocumentMixin):
# create Person objects and add pseudo local security # create Person objects and add pseudo local security
person1 = self.createUser(reference='contributor1') person1 = self.createUser(reference='contributor1')
document_module.manage_setLocalRoles(person1.Person_getUserId(), ['Assignor',]) document_module.manage_setLocalRoles(person1.Person_getUserId(), ['Author',])
person2 = self.createUser(reference='contributor2') person2 = self.createUser(reference='contributor2')
document_module.manage_setLocalRoles(person2.Person_getUserId(), ['Assignor',]) document_module.manage_setLocalRoles(person2.Person_getUserId(), ['Author',])
self.tic() self.tic()
# login as first one # login as first one
...@@ -1738,6 +1738,7 @@ class TestDocument(TestDocumentMixin): ...@@ -1738,6 +1738,7 @@ class TestDocument(TestDocumentMixin):
# login as second one # login as second one
super(TestDocument, self).loginByUserName('contributor2') super(TestDocument, self).loginByUserName('contributor2')
doc.manage_setLocalRoles(person2.Person_getUserId(), ['Assignor',])
doc.edit(title='Test2') doc.edit(title='Test2')
self.tic() self.tic()
self.login() self.login()
......
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