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 26
26
</docker-install >
27
27
<scopes >
28
28
<required >
29
- <value >2 </value >
29
+ <value >10 </value >
30
30
</required >
31
31
<optional >
32
32
<value >32</value >
Original file line number Diff line number Diff line change 1
1
"""Nextcloud API for working with drop-down file's menu."""
2
2
import os
3
+ import typing
3
4
from datetime import datetime , timezone
4
5
5
6
from pydantic import BaseModel
@@ -35,8 +36,10 @@ class UiActionFileInfo(BaseModel):
35
36
"""Last modified time"""
36
37
userId : str
37
38
"""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."""
40
43
41
44
def to_fs_node (self ) -> FsNode :
42
45
"""Returns created ``FsNode`` from the file info given.
@@ -50,7 +53,7 @@ def to_fs_node(self) -> FsNode:
50
53
user_path += "/"
51
54
full_path = os .path .join (f"files/{ self .userId } " , user_path .lstrip ("/" ))
52
55
53
- permissions = "S" if self .shared . lower () == "true" else ""
56
+ permissions = "S" if self .shareOwnerId else ""
54
57
if self .permissions & FilePermissions .PERMISSION_SHARE :
55
58
permissions += "R"
56
59
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):
104
104
favorite = str (fs_object .info .favorite ),
105
105
permissions = permissions ,
106
106
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 ,
108
109
)
109
110
fs_node = file_info .to_fs_node ()
110
111
assert isinstance (fs_node , FsNode )
You can’t perform that action at this time.
0 commit comments