summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-09-21 10:47:59 -0400
committerLoren Shih <seraph@lindenlab.com>2010-09-21 10:47:59 -0400
commit9b16a05c07372d2d86be0be1b914086984ea5285 (patch)
treeb25cdc8ada6c74abe97d1ebb9f755ae45dcde0f5 /indra/newview/llviewermenu.cpp
parent80a33895dc715c86dbeef09f19819d981355d9bd (diff)
SH-178 FIXED As a non-god, I don't want to see admin options
Admin options are now enabled by a debug setting.
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rw-r--r--indra/newview/llviewermenu.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index f62223a38d..b46febba63 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -1992,6 +1992,16 @@ class LLAdvancedShowDebugSettings : public view_listener_t
// VIEW ADMIN OPTIONS //
////////////////////////
+class LLAdvancedEnableViewAdminOptions : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ // Don't enable in god mode since the admin menu is shown anyway.
+ // Only enable if the user has set the appropriate debug setting.
+ bool new_value = !gAgent.getAgentAccess().isGodlikeWithoutAdminMenuFakery() && gSavedSettings.getBOOL("AdminMenu");
+ return new_value;
+ }
+};
class LLAdvancedToggleViewAdminOptions : public view_listener_t
{
@@ -2006,7 +2016,7 @@ class LLAdvancedCheckViewAdminOptions : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- bool new_value = check_admin_override(NULL);
+ bool new_value = check_admin_override(NULL) || gAgent.isGodlike();
return new_value;
}
};
@@ -8099,6 +8109,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedCheckShowObjectUpdates(), "Advanced.CheckShowObjectUpdates");
view_listener_t::addMenu(new LLAdvancedCompressImage(), "Advanced.CompressImage");
view_listener_t::addMenu(new LLAdvancedShowDebugSettings(), "Advanced.ShowDebugSettings");
+ view_listener_t::addMenu(new LLAdvancedEnableViewAdminOptions(), "Advanced.EnableViewAdminOptions");
view_listener_t::addMenu(new LLAdvancedToggleViewAdminOptions(), "Advanced.ToggleViewAdminOptions");
view_listener_t::addMenu(new LLAdvancedCheckViewAdminOptions(), "Advanced.CheckViewAdminOptions");
view_listener_t::addMenu(new LLAdvancedRequestAdminStatus(), "Advanced.RequestAdminStatus");