From fbb4e5fb0f7bba935ec9d0d466be12a346a6b149 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Fri, 8 Jun 2012 13:49:02 -0400 Subject: STORM-68 As a Builder, I want that ability to set default permissions on creation of objects, clothing, scripts, notecards, etc. First pass at implementation, debuggins lines still need to be removed and there is one known bug to be resolved. --- indra/newview/llpanelcontents.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelcontents.cpp') diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index a64b4ec94d..f180afa037 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -59,6 +59,7 @@ #include "llviewerregion.h" #include "llviewerwindow.h" #include "llworld.h" +#include "llfloaterperms.h" // // Imported globals @@ -156,12 +157,15 @@ void LLPanelContents::onClickNewScript(void *userdata) { LLPermissions perm; perm.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null); + + // Parameters are base, owner, everyone, group, next perm.initMasks( PERM_ALL, PERM_ALL, PERM_NONE, PERM_NONE, - PERM_MOVE | PERM_TRANSFER); + PERM_ALL); +// PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts")); std::string desc; LLViewerAssetType::generateDescriptionFor(LLAssetType::AT_LSL_TEXT, desc); LLPointer new_item = -- cgit v1.2.3 From b6df9b6d56108bcf4b3e8dfd875ef76a9b6f448b Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Sat, 9 Jun 2012 11:43:39 -0400 Subject: STORM-68 Fiddling with debugging for New Script case --- indra/newview/llpanelcontents.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpanelcontents.cpp') diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index f180afa037..db4b679c50 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -164,8 +164,8 @@ void LLPanelContents::onClickNewScript(void *userdata) PERM_ALL, PERM_NONE, PERM_NONE, - PERM_ALL); -// PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts")); + // this does not work + PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts")); std::string desc; LLViewerAssetType::generateDescriptionFor(LLAssetType::AT_LSL_TEXT, desc); LLPointer new_item = -- cgit v1.2.3 From 052dc3982056d822a523394954c277d9eb7c7ab9 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Tue, 12 Jun 2012 14:26:53 -0400 Subject: STORM-68 Fix for group perms not being defined correctly and fix for group and everyone perms failing to copy and paste --- indra/newview/llpanelcontents.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llpanelcontents.cpp') diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index db4b679c50..ac0cf460c0 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -183,6 +183,16 @@ void LLPanelContents::onClickNewScript(void *userdata) time_corrected()); object->saveScript(new_item, TRUE, true); + std::string name = new_item->getName(); +llwarns << "DBG " << new_item->getUUID() << llendl; + +// LLPermissions perm = new_item->getPermissions(); + perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts")); + perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); + perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); + new_item->setPermissions(perm); + + // *NOTE: In order to resolve SL-22177, we needed to create // the script first, and then you have to click it in // inventory to edit it. -- cgit v1.2.3 From 0b669199aa7ce0620608ea424fc366f106756651 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 20 Jun 2012 10:19:51 -0400 Subject: STORM-68 A little bit of code cleanup --- indra/newview/llpanelcontents.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'indra/newview/llpanelcontents.cpp') diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index ac0cf460c0..7ade2c7972 100644 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -162,9 +162,9 @@ void LLPanelContents::onClickNewScript(void *userdata) perm.initMasks( PERM_ALL, PERM_ALL, - PERM_NONE, - PERM_NONE, - // this does not work + // *NOTE: this does not work, needs server change + LLFloaterPerms::getEveryonePerms("Scripts"), + LLFloaterPerms::getGroupPerms("Scripts"), PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts")); std::string desc; LLViewerAssetType::generateDescriptionFor(LLAssetType::AT_LSL_TEXT, desc); @@ -184,14 +184,6 @@ void LLPanelContents::onClickNewScript(void *userdata) object->saveScript(new_item, TRUE, true); std::string name = new_item->getName(); -llwarns << "DBG " << new_item->getUUID() << llendl; - -// LLPermissions perm = new_item->getPermissions(); - perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("Scripts")); - perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("Scripts")); - perm.setMaskGroup(LLFloaterPerms::getGroupPerms("Scripts")); - new_item->setPermissions(perm); - // *NOTE: In order to resolve SL-22177, we needed to create // the script first, and then you have to click it in -- cgit v1.2.3 From a4173dc81a21dfac6a8b57e8e1c354b9a37fe5ba Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Wed, 8 Jan 2014 09:30:30 -0500 Subject: STORM-68 Remove obsolete note. Refactor a few blocks of code to not have early returns --- indra/newview/llpanelcontents.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llpanelcontents.cpp') diff --git a/indra/newview/llpanelcontents.cpp b/indra/newview/llpanelcontents.cpp index 697841ab88..89a9e0dc16 100755 --- a/indra/newview/llpanelcontents.cpp +++ b/indra/newview/llpanelcontents.cpp @@ -162,7 +162,6 @@ void LLPanelContents::onClickNewScript(void *userdata) perm.initMasks( PERM_ALL, PERM_ALL, - // *NOTE: this does not work, needs server change LLFloaterPerms::getEveryonePerms("Scripts"), LLFloaterPerms::getGroupPerms("Scripts"), PERM_MOVE | LLFloaterPerms::getNextOwnerPerms("Scripts")); -- cgit v1.2.3