diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-08-26 10:38:17 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2026-08-26 10:38:17 -0700 |
| commit | af70716e4e7dc43434c1859fa6d96e7dea5ffb9b (patch) | |
| tree | 63e716c4e12ab73e7ee52c0c4ddab23e550da908 | |
| parent | 9aa7feee4eae4fbc34d7e777c94be2e024f6c053 (diff) | |
Issue #6182: Include object permissions for both root object and linked prims.
| -rw-r--r-- | doc/external-editor-json-rpc.md | 3 | ||||
| -rw-r--r-- | indra/newview/llpublishedobjectmgr.cpp | 20 |
2 files changed, 22 insertions, 1 deletions
diff --git a/doc/external-editor-json-rpc.md b/doc/external-editor-json-rpc.md index 3744bfd5e9..74ee34f528 100644 --- a/doc/external-editor-json-rpc.md +++ b/doc/external-editor-json-rpc.md @@ -958,6 +958,7 @@ interface LinkedObject { link_number: number; // Link number (root=1, childrenā„2) link_name: string; link_description?: string; + permissions?: ObjectPermissions; // Actual permissions for this linked prim inventory: ObjectInventoryItem[]; } @@ -973,7 +974,7 @@ interface PublishedObject { object_description?: string; region?: string; owner_id?: string; - permissions?: ObjectPermissions; + permissions?: ObjectPermissions; // Actual permissions for this root prim can_save_back?: boolean; // Whether Save Back to Contents is currently available for this object inventory: ObjectInventoryItem[]; // Root prim's scripts and notecards linked_objects?: LinkedObject[]; // Child prims diff --git a/indra/newview/llpublishedobjectmgr.cpp b/indra/newview/llpublishedobjectmgr.cpp index 1eb000d98f..5c9c080b5d 100644 --- a/indra/newview/llpublishedobjectmgr.cpp +++ b/indra/newview/llpublishedobjectmgr.cpp @@ -729,6 +729,11 @@ LLSD LLPublishedObjectMgr::buildPublishedObjectLLSD(LLViewerObject* root) const { LL_PROFILE_ZONE_SCOPED_CATEGORY_SCRIPTDEV; LLSD pub; + const LLPermissions& root_perms = root->getPermissions(); + LLSD root_perm_entry; + root_perm_entry["owner"] = static_cast<S32>(root_perms.getMaskOwner()); + root_perm_entry["next_owner"] = static_cast<S32>(root_perms.getMaskNextOwner()); + pub["permissions"] = root_perm_entry; pub["object_id"] = root->getID(); pub["object_name"] = get_prim_name(root); pub["object_description"] = nv_string(root, "Desc"); @@ -753,6 +758,11 @@ LLSD LLPublishedObjectMgr::buildPublishedObjectLLSD(LLViewerObject* root) const link["link_number"] = link_number++; link["link_name"] = get_prim_name(child); link["link_description"] = nv_string(child, "Desc"); + const LLPermissions& child_perms = child->getPermissions(); + LLSD child_perm_entry; + child_perm_entry["owner"] = static_cast<S32>(child_perms.getMaskOwner()); + child_perm_entry["next_owner"] = static_cast<S32>(child_perms.getMaskNextOwner()); + link["permissions"] = child_perm_entry; link["inventory"] = buildPrimInventoryLLSD(child); linked_objects.append(link); } @@ -778,6 +788,11 @@ LLSD LLPublishedObjectMgr::buildObjectListLLSD() const } LLSD pub; + const LLPermissions& root_perms = root->getPermissions(); + LLSD root_perm_entry; + root_perm_entry["owner"] = static_cast<S32>(root_perms.getMaskOwner()); + root_perm_entry["next_owner"] = static_cast<S32>(root_perms.getMaskNextOwner()); + pub["permissions"] = root_perm_entry; pub["object_id"] = info.mObjectID; pub["object_name"] = info.mObjectName; pub["object_description"] = info.mObjectDescription; @@ -808,6 +823,11 @@ LLSD LLPublishedObjectMgr::buildObjectListLLSD() const link["link_number"] = prim_info.mLinkNumber; link["link_name"] = prim_info.mPrimName; link["link_description"] = prim_info.mPrimDescription; + const LLPermissions& child_perms = child->getPermissions(); + LLSD child_perm_entry; + child_perm_entry["owner"] = static_cast<S32>(child_perms.getMaskOwner()); + child_perm_entry["next_owner"] = static_cast<S32>(child_perms.getMaskNextOwner()); + link["permissions"] = child_perm_entry; link["inventory"] = buildPrimInventoryLLSD(child); linked_objects.append(link); } |
