summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelgrouproles.cpp23
-rw-r--r--indra/newview/llviewerregion.cpp6
-rw-r--r--indra/newview/llviewerregion.h2
-rw-r--r--indra/newview/roles_constants.h4
-rw-r--r--indra/newview/skins/default/xui/en/role_actions.xml9
5 files changed, 39 insertions, 5 deletions
diff --git a/indra/newview/llpanelgrouproles.cpp b/indra/newview/llpanelgrouproles.cpp
index b4adbe0819..5c8c5c85b2 100644
--- a/indra/newview/llpanelgrouproles.cpp
+++ b/indra/newview/llpanelgrouproles.cpp
@@ -53,6 +53,7 @@
#include "llviewerwindow.h"
#include "llfocusmgr.h"
#include "llviewercontrol.h"
+#include "llviewerregion.h"
#include "roles_constants.h"
@@ -541,6 +542,19 @@ bool LLPanelGroupSubTab::matchesActionSearchFilter(std::string action)
}
}
+// Powers the viewer knows about but the current region has not enabled
+// via SimulatorFeatures; these are hidden from the abilities lists.
+static U64 get_unsupported_powers()
+{
+ U64 unsupported = 0;
+ LLViewerRegion* region = gAgent.getRegion();
+ if (!region || !region->groupChatPostLinksEnabled())
+ {
+ unsupported |= GP_SESSION_POST_LINKS;
+ }
+ return unsupported;
+}
+
void LLPanelGroupSubTab::buildActionsList(LLScrollListCtrl* ctrl,
U64 allowed_by_some,
U64 allowed_by_all,
@@ -582,8 +596,9 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
bool is_owner_role)
{
LL_DEBUGS() << "Building role list for: " << action_set->mActionSetData->mName << LL_ENDL;
+ U64 unsupported_powers = get_unsupported_powers();
// See if the allow mask matches anything in this category.
- if (show_all || (allowed_by_some & action_set->mActionSetData->mPowerBit))
+ if (show_all || (allowed_by_some & action_set->mActionSetData->mPowerBit & ~unsupported_powers))
{
// List all the actions in this category that at least some members have.
LLSD row;
@@ -619,6 +634,12 @@ void LLPanelGroupSubTab::buildActionCategory(LLScrollListCtrl* ctrl,
for ( ; ra_it != ra_end; ++ra_it)
{
+ // Skip abilities the current region doesn't support.
+ if (unsupported_powers & (*ra_it)->mPowerBit)
+ {
+ continue;
+ }
+
// See if anyone has these action.
if (!show_all && !(allowed_by_some & (*ra_it)->mPowerBit))
{
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 7b9a6de2ed..83452e2f12 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -3766,6 +3766,12 @@ bool LLViewerRegion::avatarHoverHeightEnabled() const
return ( mSimulatorFeatures.has("AvatarHoverHeightEnabled") &&
mSimulatorFeatures["AvatarHoverHeightEnabled"].asBoolean());
}
+
+bool LLViewerRegion::groupChatPostLinksEnabled() const
+{
+ return ( mSimulatorFeatures.has("GroupChatPostLinksEnabled") &&
+ mSimulatorFeatures["GroupChatPostLinksEnabled"].asBoolean());
+}
/* Static Functions */
void log_capabilities(const CapabilityMap &capmap)
diff --git a/indra/newview/llviewerregion.h b/indra/newview/llviewerregion.h
index a086d45ec1..0ad2038490 100644
--- a/indra/newview/llviewerregion.h
+++ b/indra/newview/llviewerregion.h
@@ -352,6 +352,8 @@ public:
bool avatarHoverHeightEnabled() const;
+ bool groupChatPostLinksEnabled() const;
+
typedef enum
{
CACHE_MISS_TYPE_TOTAL = 0, // total cache miss - object not in cache
diff --git a/indra/newview/roles_constants.h b/indra/newview/roles_constants.h
index ae3ec57b86..21bf4bcad9 100644
--- a/indra/newview/roles_constants.h
+++ b/indra/newview/roles_constants.h
@@ -52,7 +52,7 @@ enum LLRoleChangeType
//
// KNOWN HOLES: use these for any single bit powers you need
-// bit 0x1 << 52 and above
+// bit 0x1 << 53 and above
// These powers were removed to make group roles simpler
// bit 0x1 << 41 (GP_ACCOUNTING_VIEW)
@@ -144,6 +144,7 @@ const U64 GP_PROPOSAL_VOTE = 0x1LL << 45; // Vote on Proposal
const U64 GP_SESSION_JOIN = 0x1LL << 16; //can join session
const U64 GP_SESSION_VOICE = 0x1LL << 27; //can hear/talk
const U64 GP_SESSION_MODERATOR = 0x1LL << 37; //can mute people's session
+const U64 GP_SESSION_POST_LINKS = 0x1LL << 52; //can post links in group chat
const U64 GP_EXPERIENCE_ADMIN = 0x1LL << 49; // has admin rights to any experiences owned by this group
const U64 GP_EXPERIENCE_CREATOR = 0x1LL << 50; // can sign scripts for experiences owned by this group
@@ -194,5 +195,6 @@ const U64 GP_DEFAULT_OFFICER = GP_DEFAULT_MEMBER // Superset of GP_DEFAULT_MEMBE
| GP_ROLE_ASSIGN_MEMBER_LIMITED
| GP_ROLE_PROPERTIES
| GP_SESSION_MODERATOR
+ | GP_SESSION_POST_LINKS
;
#endif
diff --git a/indra/newview/skins/default/xui/en/role_actions.xml b/indra/newview/skins/default/xui/en/role_actions.xml
index af371dea26..94bb13a07e 100644
--- a/indra/newview/skins/default/xui/en/role_actions.xml
+++ b/indra/newview/skins/default/xui/en/role_actions.xml
@@ -116,7 +116,7 @@
name="land allow set home" value="28" />
<action description="Allow &apos;Event Hosting&apos; on group land"
longdescription="Members in a Role with this Ability can select group owned parcels as venus when hosting an event."
- name="land allow host event" value="41" />
+ name="land allow host event" value="41" />
</action_set>
<action_set
description="These Abilities include powers to allow or restrict access to group-owned parcels, including freezing and ejecting Residents."
@@ -181,17 +181,20 @@
name="notices receive" value="43" />
</action_set>
<action_set
- description="These Abilities include powers to allow or restrict access to group chat sessions and group voice chat."
+ description="These Abilities include powers to allow or restrict access to group chat sessions and group voice chat."
name="Chat">
<action description="Join Group Chat"
longdescription="Members in a Role with this Ability can join group chat sessions, for text and voice."
name="join group chat" value="16" />
<action description="Join Group Voice Chat"
longdescription="Members in a Role with this Ability can join group voice chat sessions. NOTE: The Join Group Chat ability is required to access the voice chat session."
- name="join voice chat" value="27" />
+ name="join voice chat" value="27" />
<action description="Moderate Group Chat"
longdescription="Members in a Role with this Ability can control access and participation in group voice and text chat sessions."
name="moderate group chat" value="37" />
+ <action description="Post links in chat"
+ longdescription="Members in a Role with this Ability can post clickable web links (http:// and https://) in group chat. Links posted by Members without this Ability are replaced with the text &apos;(Link removed by group moderators)&apos; for all recipients."
+ name="chat post links" value="52" />
</action_set>
<action_set
description="These Abilities include power to modify experiences owned by this group."