From d27fc4ad338cb2839363ce2cca70359c82da5b98 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 7 Aug 2013 15:56:29 -0700 Subject: MAINT-2257 : Create ability to limit region/estate and parcel access by either Piof or Group membership (viewer changes). Using Mnikolenko's patch --- indra/llinventory/llparcel.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/llinventory/llparcel.cpp') diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index 37c603348e..fdb056b4a1 100755 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -521,6 +521,11 @@ S32 LLParcel::blockAccess(const LLUUID& agent_id, const LLUUID& group_id, return BA_ALLOWED; } + if(getParcelFlag(PF_DENY_ANONYMOUS) && is_agent_identified && is_agent_transacted) + { + return BA_ALLOWED; + } + return BA_NOT_IN_GROUP; } -- cgit v1.2.3 From edf2b52cb2476e8d7dada9529354e8f1755d141b Mon Sep 17 00:00:00 2001 From: simon_linden Date: Tue, 3 Sep 2013 17:18:59 -0700 Subject: MAINT-3082 : Remove unused viewer LLParcel code --- indra/llinventory/llparcel.cpp | 116 ----------------------------------------- 1 file changed, 116 deletions(-) (limited to 'indra/llinventory/llparcel.cpp') diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index fdb056b4a1..5eb5fb442d 100755 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -414,122 +414,6 @@ BOOL LLParcel::allowTerraformBy(const LLUUID &agent_id) const } -bool LLParcel::isAgentBlockedFromParcel(LLParcel* parcelp, - const LLUUID& agent_id, - const uuid_vec_t& group_ids, - const BOOL is_agent_identified, - const BOOL is_agent_transacted, - const BOOL is_agent_ageverified) -{ - S32 current_group_access = parcelp->blockAccess(agent_id, LLUUID::null, is_agent_identified, is_agent_transacted, is_agent_ageverified); - S32 count; - bool is_allowed = (current_group_access == BA_ALLOWED) ? true: false; - LLUUID group_id; - - count = group_ids.size(); - for (int i = 0; i < count && !is_allowed; i++) - { - group_id = group_ids[i]; - current_group_access = parcelp->blockAccess(agent_id, group_id, is_agent_identified, is_agent_transacted, is_agent_ageverified); - - if (current_group_access == BA_ALLOWED) is_allowed = true; - } - - return !is_allowed; -} - -BOOL LLParcel::isAgentBanned(const LLUUID& agent_id) const -{ - // Test ban list - if (mBanList.find(agent_id) != mBanList.end()) - { - return TRUE; - } - - return FALSE; -} - -S32 LLParcel::blockAccess(const LLUUID& agent_id, const LLUUID& group_id, - const BOOL is_agent_identified, - const BOOL is_agent_transacted, - const BOOL is_agent_ageverified) const -{ - // Test ban list - if (isAgentBanned(agent_id)) - { - return BA_BANNED; - } - - // Always allow owner on (unless he banned himself, useful for - // testing). We will also allow estate owners/managers in if they - // are not explicitly banned. - if (agent_id == mOwnerID) - { - return BA_ALLOWED; - } - - // Special case when using pass list where group access is being restricted but not - // using access list. In this case group members are allowed only if they buy a pass. - // We return BA_NOT_IN_LIST if not in list - BOOL passWithGroup = getParcelFlag(PF_USE_PASS_LIST) && !getParcelFlag(PF_USE_ACCESS_LIST) - && getParcelFlag(PF_USE_ACCESS_GROUP) && !mGroupID.isNull() && group_id == mGroupID; - - - // Test group list - if (getParcelFlag(PF_USE_ACCESS_GROUP) - && !mGroupID.isNull() - && group_id == mGroupID - && !passWithGroup) - { - return BA_ALLOWED; - } - - // Test access list - if (getParcelFlag(PF_USE_ACCESS_LIST) || passWithGroup ) - { - if (mAccessList.find(agent_id) != mAccessList.end()) - { - return BA_ALLOWED; - } - - return BA_NOT_ON_LIST; - } - - // If we're not doing any other limitations, all users - // can enter, unless - if ( !getParcelFlag(PF_USE_ACCESS_GROUP) - && !getParcelFlag(PF_USE_ACCESS_LIST)) - { - //If the land is group owned, and you are in the group, bypass these checks - if(getIsGroupOwned() && group_id == mGroupID) - { - return BA_ALLOWED; - } - - // Test for "payment" access levels - // Anonymous - No Payment Info on File - if(getParcelFlag(PF_DENY_ANONYMOUS) && !is_agent_identified && !is_agent_transacted) - { - return BA_NO_ACCESS_LEVEL; - } - // AgeUnverified - Not Age Verified - if(getParcelFlag(PF_DENY_AGEUNVERIFIED) && !is_agent_ageverified) - { - return BA_NOT_AGE_VERIFIED; - } - - return BA_ALLOWED; - } - - if(getParcelFlag(PF_DENY_ANONYMOUS) && is_agent_identified && is_agent_transacted) - { - return BA_ALLOWED; - } - - return BA_NOT_IN_GROUP; - -} - void LLParcel::setArea(S32 area, S32 sim_object_limit) { -- cgit v1.2.3