Regression: CreateLinkPostRequestBody serializes retainInheritedPermissions=false by default starting in 1.59.2
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
Hướng nghiên cứu
Bắt đầu với entry point CreateLinkPostRequestBody được tạo tự động và hiển thị trong đường dẫn import, rồi tái hiện quá trình serialization bằng ví dụ test.py. So sánh đầu ra với các phiên bản 1.58.0 và 1.59.2, tập trung vào các giá trị bị bỏ qua của retainInheritedPermissions và sendNotification. Hoàn thành khi các thuộc tính chưa được thiết lập không còn serialize các giá trị false, cho phép áp dụng các giá trị mặc định của createLink API.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
Context
I was using the CreateLinkPostRequestBody to create some link to my driveItems, and it was working properly, but at some point I noticed that some of these files would not be visible to some users anymore (inherited permissions were lost).
The "bug"
Starting with msgraph-sdk-python 1.59.2, CreateLinkPostRequestBody serializes: { "retainInheritedPermissions": false, "sendNotification": false } when these properties are not explicitly set by the caller.
This changes the behavior of the createLink API. According to the Microsoft Graph documentation, retainInheritedPermissions is optional and the service default when omitted is true .
Expected behavior
I believe that the CreateLinkPostRequestBody default attribute values should follow the defaults of the createLink API.
Thus setting retainInheritedPermissions to true (or unset) for the createLink API if not provided in CreateLinkPostRequestBody.
How to reproduce
test.py
from msgraph.generated.drives.item.items.item.create_link.create_link_post_request_body import CreateLinkPostRequestBody
request_body = CreateLinkPostRequestBody(
type="view",
scope="organization"
)
from kiota_serialization_json.json_serialization_writer import JsonSerializationWriter
writer = JsonSerializationWriter()
request_body.serialize(writer)
print(writer.get_serialized_content().decode('utf-8'))
Results
version 1.58.0
{
"scope": "organization",
"type": "view"
}
This will let the createLink API default the retainInheritedPermissions to True.
version 1.59.2 and 1.60.0
{
"retainInheritedPermissions": false,
"scope": "organization",
"sendNotification": false,
"type": "view"
}
This will remove existing permissions.
SDK Version
1.59.2
Latest version known to work for scenario above?
1.58.0
Known Workarounds
Explicitly adding the retain_inherited_permissions = True
request_body = CreateLinkPostRequestBody(
retain_inherited_permissions=True,
type="view",
scope="organization"
)
Debug output
Click to expand log
```</details>
### Configuration
Ubuntu 22.04
x86_64
### Other information
_No response_
- Ngôn ngữ chính
- Python
- Star
- 630
- Fork
- 96
- Merge trung bình
- 15 giờ 20 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoftgraph/msgraph-sdk-python
-
status:waiting-for-triage type:bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
microsoftgraph/msgraph-sdk-python#1570 ·
-
Needs: Attention :wave: type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
microsoftgraph/msgraph-sdk-python#1287 · 2 bình luận · 1 reaction ·
-
Batch Request Support Đang mởstatus:waiting-for-triage
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
microsoftgraph/msgraph-sdk-python#1557 ·
-
status:waiting-for-triage type:bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
microsoftgraph/msgraph-sdk-python#1556 · 1 bình luận · 1 reaction ·
-
status:waiting-for-triage type:bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
microsoftgraph/msgraph-sdk-python#1542 ·
Tất cả issue của microsoftgraph/msgraph-sdk-python
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
zostera/django-bootstrap4#894 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
use-agent-os/agent-os#3276 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#117848 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
zilliztech/memsearch#759 ·