From d1c2d29d02317c8f39c0daa9dcb00cd8d1209790 Mon Sep 17 00:00:00 2001 From: leviathan Date: Thu, 10 Sep 2026 14:42:47 -0700 Subject: add enum value for GP_SESSION_POST_LINKS group ability --- indra/newview/roles_constants.h | 4 +++- indra/newview/skins/default/xui/en/role_actions.xml | 9 ++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) 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" /> + name="land allow host event" value="41" /> + name="join voice chat" value="27" /> + Date: Thu, 8 Oct 2026 09:56:36 -0700 Subject: put GP_SESSION_POST_LINKS behind a feature flag --- indra/newview/llpanelgrouproles.cpp | 23 ++++++++++++++++++++++- indra/newview/llviewerregion.cpp | 6 ++++++ indra/newview/llviewerregion.h | 2 ++ 3 files changed, 30 insertions(+), 1 deletion(-) 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 c37daa53a3..d4fe146a06 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -3764,6 +3764,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 f1eb335582..d5bd6479eb 100644 --- a/indra/newview/llviewerregion.h +++ b/indra/newview/llviewerregion.h @@ -351,6 +351,8 @@ public: bool avatarHoverHeightEnabled() const; + bool groupChatPostLinksEnabled() const; + typedef enum { CACHE_MISS_TYPE_TOTAL = 0, // total cache miss - object not in cache -- cgit v1.3