sharing/create: do not allow additional share with PathMapped for same User - testcase
This commit is contained in:
@@ -812,6 +812,7 @@ class TestSharingApiSanity(BaseTest):
|
||||
|
||||
path_owner = "/owner/calendar.ics/"
|
||||
path_user = "/user/calendar-owner.ics/"
|
||||
path_user2 = "/user/calendar-owner2.ics/"
|
||||
self.mkcalendar(path_owner, login="owner:ownerpw")
|
||||
|
||||
for db_type in list(filter(lambda item: item != "none", sharing.INTERNAL_TYPES)):
|
||||
@@ -864,6 +865,13 @@ class TestSharingApiSanity(BaseTest):
|
||||
json_dict['PathMapped'] = path_owner
|
||||
_, headers, answer = self._sharing_api_json("map", "create", 200, login="owner:ownerpw", json_dict=json_dict)
|
||||
|
||||
logging.info("\n*** create map with PathMapped, User, PathOrToken2 (json) -> 409")
|
||||
json_dict = {}
|
||||
json_dict['User'] = "user"
|
||||
json_dict['PathOrToken'] = path_user2
|
||||
json_dict['PathMapped'] = path_owner
|
||||
_, headers, answer = self._sharing_api_json("map", "create", 409, login="owner:ownerpw", json_dict=json_dict)
|
||||
|
||||
logging.info("\n*** create map with PathMapped, User, PathOrToken=PathOwner (json) -> 409")
|
||||
json_dict = {}
|
||||
json_dict['User'] = "owner"
|
||||
|
||||
Reference in New Issue
Block a user