SL-19528 Remove PERMISSION_DEBIT warning from experience that is Grid and Privileged

meow-7.2.2
Alexander Gavriliuk 2023-08-01 00:53:23 +02:00
parent 62245de7ae
commit c71da80dc2
1 changed files with 16 additions and 0 deletions

View File

@ -5815,6 +5815,22 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
args["OBJECTNAME"] = object_name;
args["NAME"] = clean_owner_name;
S32 known_questions = 0;
// SL-19346, SL-19528 - No DEBIT warning for GRID & PRIVILEGED
if (experienceid.notNull())
{
const LLSD& experience = LLExperienceCache::instance().get(experienceid);
if (!experience.isUndefined())
{
S32 properties = experience[LLExperienceCache::PROPERTIES].asInteger();
if ((properties | LLExperienceCache::PROPERTY_GRID) &&
(properties | LLExperienceCache::PROPERTY_PRIVILEGED))
{
questions ^= SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_DEBIT].permbit;
}
}
}
bool has_not_only_debit = questions ^ SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_DEBIT].permbit;
// check the received permission flags against each permission
BOOST_FOREACH(script_perm_t script_perm, SCRIPT_PERMISSIONS)