ocis icon indicating copy to clipboard operation
ocis copied to clipboard

API test cases for `COPY` file between spaces

Open S-Panta opened this issue 6 months ago • 2 comments

COPY

Similar to https://github.com/owncloud/ocis/issues/8121

1. Using file id

Test cases

from from (role) to to (role) expected result automated
personal personal{within same folder} 201 201 :+1: :white_check_mark:
personal personal{inside subfolder} 201 201 :+1: :white_check_mark:
personal personal{from subfolder to root } 201 201 :+1: :white_check_mark:
personal project{finside folder} 201 201 :+1: :white_check_mark:
project personal 201 201 :+1: :white_check_mark:
share jail share jail {from sub-folder to another folder inside share} Editor 201 201 :+1: :white_check_mark:
personal share jail Editor 201 201 :+1: :white_check_mark:
share jail personal 201 201 :+1: :white_check_mark:
project project{project spaces within same user} 201 201 :+1: :white_check_mark:
project different permission share jail different permission 201 201 :+1: :white_check_mark: https://github.com/owncloud/ocis/pull/9940
project different permission personal 201 201 :+1: :white_check_mark: https://github.com/owncloud/ocis/pull/9940
project different permission project different permission 201 201 :+1: :white_check_mark: https://github.com/owncloud/ocis/pull/9940
share jail different permission project different permission 201 201 :+1: :white_check_mark: https://github.com/owncloud/ocis/pull/9932
share jail different permission share jail different permission 201 201 :+1: :white_check_mark: https://github.com/owncloud/ocis/pull/9932
share jail different permission personal 201 201 :+1: :white_check_mark: https://github.com/owncloud/ocis/pull/9932

2. Using file path

Test cases

from from (role) to to (role) expected result automated
project project{both file and folder within folder of shared project space} Manager and Space Editor 201 201 :+1: :white_check_mark:
project project{within folder of shared project space} Viewer 403 403 :+1: :white_check_mark:
project Manager/Space Editor project Manager/ Space Editor 201 201 :+1: :white_check_mark:
project Manager/ Space Editor project viewer 403 403 :+1: :white_check_mark:
project Manager/ Space Editor/ Space Viewer personal 201 201 :+1: :white_check_mark:
project Manager/ Space Editor/ Space Viewer share jail(inside folder) editor 201 201 :+1: :white_check_mark:
project Manager/ Space Editor/ Space Viewer share jail(inside folder) viewer 403 403 :+1: :white_check_mark:
project manager/space editor/viewer project Manager and Space Editor 201 201 :+1:
project manager/space editor/viewer project Space Viewer 403 403 :+1:
project manager/space editor/viewer share jail Editor 201 201 :+1: :white_check_mark:
project manager/space editor/viewer share jail viewer 403 403 :+1: :white_check_mark:
personal share jail viewer 403 403 :+1: :white_check_mark:
personal share jail Editor(option keep both) 201 201 :+1: :white_check_mark:
personal share jail Editor(option replace) 201 204 :grey_question: :white_check_mark:
personal project Manager/Space editor 201 201 :+1: :white_check_mark:
personal project viewer 403 403 :+1: :white_check_mark:
personal share jail Editor 201 201 :+1: :white_check_mark:
personal share jail(overwrites a file) viewer 403 403 :+1: :white_check_mark:
personal share jail (copy file over existing folder) Editor 204 400 :grey_question: https://github.com/owncloud/ocis/issues/7208 :white_check_mark:
personal share jail (copy folder over existing file) Editor 204 400 :grey_question: :white_check_mark: https://github.com/owncloud/ocis/pull/6323
personal share jail (copy a folder into another folder at different level) Editor 204 204 :+1: :white_check_mark:
personal share jail (copy a file into another folder at different level) Editor 204 204 :+1: :white_check_mark:
personal share jail (copy a file into another file at different level) Editor 204 204 :+1: :white_check_mark:
personal share jail (copy a folder into another file at different level) (all overwrites scenario are done also for group share) Editor 204 204 :+1: :white_check_mark:
share jail editor/viewer personal 201 201 :+1: :white_check_mark:
share jail secure viewer personal 403 403 :+1:(https://github.com/owncloud/ocis/issues/9482) :white_check_mark:
share jail editor/ viewer project manager/space editor 201 201 :+1: :white_check_mark:
share jail secure viewer project manager/space editor 403 403 :+1::(https://github.com/owncloud/ocis/issues/9482) :white_check_mark:
share jail editor project viewer 403 403 :+1: :white_check_mark:
share jail editor/viewer share jail ( between different shares) editor 201 201 :+1: :white_check_mark:
share jail editor/viewer/secure viewer share jail ( between different shares) viewer/secure viewer 403 403 :+1::(https://github.com/owncloud/ocis/issues/9482) :white_check_mark:

Other scenario related to copy

  • copying a file with an option "keep both" inside of the project space
  • copying a file with an option "replace" inside of the project space
  • copy blacklisted file isn't possible.
  • copy a file of size zero byte
  • copy (existent/non existent file/folder) into (existent/non existent file/folder)
  • copying a folder into a sub-folder of itself

Bug Report

  • copying a file/folder to itself https://github.com/owncloud/ocis/issues/8711

S-Panta avatar Aug 21 '24 08:08 S-Panta