File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed
examples/as_app/to_gif/appinfo Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 2626 </docker-install >
2727 <scopes >
2828 <required >
29- <value >2 </value >
29+ <value >10 </value >
3030 </required >
3131 <optional >
3232 <value >32</value >
Original file line number Diff line number Diff line change 11"""Nextcloud API for working with drop-down file's menu."""
22import os
3+ import typing
34from datetime import datetime , timezone
45
56from pydantic import BaseModel
@@ -35,8 +36,10 @@ class UiActionFileInfo(BaseModel):
3536 """Last modified time"""
3637 userId : str
3738 """The ID of the user performing the action."""
38- shared : str
39- """**true** or **false**"""
39+ shareOwner : typing .Optional [str ]
40+ """If the object is shared, this is a display name of the share owner."""
41+ shareOwnerId : typing .Optional [str ]
42+ """If the object is shared, this is the owner ID of the share."""
4043
4144 def to_fs_node (self ) -> FsNode :
4245 """Returns created ``FsNode`` from the file info given.
@@ -50,7 +53,7 @@ def to_fs_node(self) -> FsNode:
5053 user_path += "/"
5154 full_path = os .path .join (f"files/{ self .userId } " , user_path .lstrip ("/" ))
5255
53- permissions = "S" if self .shared . lower () == "true" else ""
56+ permissions = "S" if self .shareOwnerId else ""
5457 if self .permissions & FilePermissions .PERMISSION_SHARE :
5558 permissions += "R"
5659 if self .permissions & FilePermissions .PERMISSION_READ :
Original file line number Diff line number Diff line change @@ -104,7 +104,8 @@ def ui_action_check(directory: str, fs_object: FsNode):
104104 favorite = str (fs_object .info .favorite ),
105105 permissions = permissions ,
106106 userId = fs_object .user ,
107- shared = "true" if fs_object .is_shared else "false" ,
107+ shareOwner = "some_user" if fs_object .is_shared else None ,
108+ shareOwnerId = "some_user_id" if fs_object .is_shared else None ,
108109 )
109110 fs_node = file_info .to_fs_node ()
110111 assert isinstance (fs_node , FsNode )
You can’t perform that action at this time.
0 commit comments