summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2011-01-06 16:31:27 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2011-01-06 16:31:27 -0500
commit8d2c4369dadc59e83a759f8e5fd62e823ca36a23 (patch)
tree1e43316ef7e4fff3f8460d0cceafea4b19d528fd /indra/newview
parent9ece5ed5101c6a216e0bc616ae193b28b18eae30 (diff)
Validation check for edit classified and edit pick slapps
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llpanelpicks.cpp32
1 files changed, 23 insertions, 9 deletions
diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp
index 597ecc0589..c4f3866cad 100755
--- a/indra/newview/llpanelpicks.cpp
+++ b/indra/newview/llpanelpicks.cpp
@@ -158,7 +158,14 @@ public:
}
// open the edit side tray for this pick
- editPick(pick_info);
+ if (pick_info->creator_id == gAgent.getID())
+ {
+ editPick(pick_info);
+ }
+ else
+ {
+ llwarns << "Can't edit a pick you did not create" << llendl;
+ }
// remove our observer now that we're done
mPickIds.erase(pick_info->pick_id);
@@ -254,14 +261,21 @@ public:
}
else if (mRequestVerb == "edit")
{
- llwarns << "edit in progress" << llendl;
- // open the new classified panel on the Me > Picks sidetray
- LLSD params;
- params["id"] = gAgent.getID();
- params["open_tab_name"] = "panel_picks";
- params["show_tab_panel"] = "edit_classified";
- params["classified_id"] = c_info->classified_id;
- LLSideTray::getInstance()->showPanel("panel_me", params);
+ if (c_info->creator_id == gAgent.getID())
+ {
+ llwarns << "edit in progress" << llendl;
+ // open the new classified panel on the Me > Picks sidetray
+ LLSD params;
+ params["id"] = gAgent.getID();
+ params["open_tab_name"] = "panel_picks";
+ params["show_tab_panel"] = "edit_classified";
+ params["classified_id"] = c_info->classified_id;
+ LLSideTray::getInstance()->showPanel("panel_me", params);
+ }
+ else
+ {
+ llwarns << "Can't edit a classified you did not create" << llendl;
+ }
}
}