From 339a5449fc89700ee22c53ecd60adbed6faba1a5 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 21 Sep 2018 18:24:12 +0300 Subject: SL-9714 [EEP] Allow changing permissions of environment settings using the bulk perms floater --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llfloaterbulkpermission.cpp | 11 ++++++++++- indra/newview/llfloaterbulkpermission.h | 1 + indra/newview/skins/default/xui/en/floater_bulk_perms.xml | 15 ++++++++++++++- 4 files changed, 36 insertions(+), 2 deletions(-) (limited to 'indra') diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 123197db3b..83afa0ed8c 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1252,6 +1252,17 @@ Value 1 + BulkChangeIncludeSettings + + Comment + Bulk permission changes affect environment settings + Persist + 1 + Type + Boolean + Value + 1 + BulkChangeEveryoneCopy Comment diff --git a/indra/newview/llfloaterbulkpermission.cpp b/indra/newview/llfloaterbulkpermission.cpp index f2040bc760..a1a06706bc 100644 --- a/indra/newview/llfloaterbulkpermission.cpp +++ b/indra/newview/llfloaterbulkpermission.cpp @@ -75,6 +75,7 @@ BOOL LLFloaterBulkPermission::postBuild() mBulkChangeIncludeScripts = gSavedSettings.getBOOL("BulkChangeIncludeScripts"); mBulkChangeIncludeSounds = gSavedSettings.getBOOL("BulkChangeIncludeSounds"); mBulkChangeIncludeTextures = gSavedSettings.getBOOL("BulkChangeIncludeTextures"); + mBulkChangeIncludeSettings = gSavedSettings.getBOOL("BulkChangeIncludeSettings"); mBulkChangeShareWithGroup = gSavedSettings.getBOOL("BulkChangeShareWithGroup"); mBulkChangeEveryoneCopy = gSavedSettings.getBOOL("BulkChangeEveryoneCopy"); mBulkChangeNextOwnerModify = gSavedSettings.getBOOL("BulkChangeNextOwnerModify"); @@ -186,6 +187,7 @@ void LLFloaterBulkPermission::onCloseBtn() gSavedSettings.setBOOL("BulkChangeIncludeScripts", mBulkChangeIncludeScripts); gSavedSettings.setBOOL("BulkChangeIncludeSounds", mBulkChangeIncludeSounds); gSavedSettings.setBOOL("BulkChangeIncludeTextures", mBulkChangeIncludeTextures); + gSavedSettings.setBOOL("BulkChangeIncludeSettings", mBulkChangeIncludeSettings); gSavedSettings.setBOOL("BulkChangeShareWithGroup", mBulkChangeShareWithGroup); gSavedSettings.setBOOL("BulkChangeEveryoneCopy", mBulkChangeEveryoneCopy); gSavedSettings.setBOOL("BulkChangeNextOwnerModify", mBulkChangeNextOwnerModify); @@ -281,6 +283,7 @@ void LLFloaterBulkPermission::doCheckUncheckAll(BOOL check) gSavedSettings.setBOOL("BulkChangeIncludeScripts" , check); gSavedSettings.setBOOL("BulkChangeIncludeSounds" , check); gSavedSettings.setBOOL("BulkChangeIncludeTextures" , check); + gSavedSettings.setBOOL("BulkChangeIncludeSettings" , check); } @@ -302,6 +305,7 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInve ( asstype == LLAssetType::AT_OBJECT && gSavedSettings.getBOOL("BulkChangeIncludeObjects" )) || ( asstype == LLAssetType::AT_LSL_TEXT && gSavedSettings.getBOOL("BulkChangeIncludeScripts" )) || ( asstype == LLAssetType::AT_SOUND && gSavedSettings.getBOOL("BulkChangeIncludeSounds" )) || + ( asstype == LLAssetType::AT_SETTINGS && gSavedSettings.getBOOL("BulkChangeIncludeSettings" )) || ( asstype == LLAssetType::AT_TEXTURE && gSavedSettings.getBOOL("BulkChangeIncludeTextures" ))) { LLViewerObject* object = gObjectList.findObject(viewer_obj->getID()); @@ -333,7 +337,12 @@ void LLFloaterBulkPermission::handleInventory(LLViewerObject* viewer_obj, LLInve //|| something else // for next owner perms ) { - perm.setMaskNext(LLFloaterPerms::getNextOwnerPerms("BulkChange")); + U32 mask_next = LLFloaterPerms::getNextOwnerPerms("BulkChange"); + if (asstype == LLAssetType::AT_SETTINGS) + { + mask_next |= PERM_COPY; + } + perm.setMaskNext(mask_next); perm.setMaskEveryone(LLFloaterPerms::getEveryonePerms("BulkChange")); perm.setMaskGroup(LLFloaterPerms::getGroupPerms("BulkChange")); new_item->setPermissions(perm); // here's the beef diff --git a/indra/newview/llfloaterbulkpermission.h b/indra/newview/llfloaterbulkpermission.h index 0c042c3ee3..1afc876bba 100644 --- a/indra/newview/llfloaterbulkpermission.h +++ b/indra/newview/llfloaterbulkpermission.h @@ -102,6 +102,7 @@ private: bool mBulkChangeIncludeScripts; bool mBulkChangeIncludeSounds; bool mBulkChangeIncludeTextures; + bool mBulkChangeIncludeSettings; bool mBulkChangeShareWithGroup; bool mBulkChangeEveryoneCopy; bool mBulkChangeNextOwnerModify; diff --git a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml index e7ab3cacdc..b4577f54e6 100644 --- a/indra/newview/skins/default/xui/en/floater_bulk_perms.xml +++ b/indra/newview/skins/default/xui/en/floater_bulk_perms.xml @@ -156,7 +156,20 @@ name="icon_texture" tool_tip="Textures" left_pad="2" /> - + +