Skip to content

Commit

Permalink
Fix can modify file which is not under resource path
Browse files Browse the repository at this point in the history
  • Loading branch information
ruanwenjun committed Feb 28, 2024
1 parent 3fda980 commit 2168846
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 610 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Result<Object> createDirectory(User loginUser,
* @param currentDir current directory
* @return create result code
*/
Result<Object> createResource(User loginUser,
Result<Object> uploadResource(User loginUser,
String name,
ResourceType type,
MultipartFile file,
Expand Down Expand Up @@ -160,8 +160,8 @@ Result<PageInfo<StorageEntity>> queryResourceListPaging(User loginUser, String f
* @param content content
* @return create result code
*/
Result<Object> onlineCreateResource(User loginUser, ResourceType type, String fileName, String fileSuffix,
String content, String currentDirectory);
Result<Object> createResourceFile(User loginUser, ResourceType type, String fileName, String fileSuffix,
String content, String currentDirectory);

/**
* create or update resource.
Expand Down Expand Up @@ -210,33 +210,6 @@ Result<Object> updateResourceContent(User loginUser, String fullName, String ten
*/
DeleteDataTransferResponse deleteDataTransferData(User loginUser, Integer days);

/**
* unauthorized udf function
*
* @param loginUser login user
* @param userId user id
* @return unauthorized result code
*/
Map<String, Object> unauthorizedUDFFunction(User loginUser, Integer userId);

/**
* authorized udf function
*
* @param loginUser login user
* @param userId user id
* @return authorized result code
*/
Map<String, Object> authorizedUDFFunction(User loginUser, Integer userId);

/**
* get resource by id
* @param fullName resource full name
* @param tenantCode owner's tenant code of resource
* @return resource
*/
Result<Object> queryResourceByFullName(User loginUser, String fullName, String tenantCode,
ResourceType type) throws IOException;

/**
* get resource base dir
*
Expand Down
Loading

0 comments on commit 2168846

Please sign in to comment.