// static bool PanelRadar::callbackBanFromEstate(const LLSD& notification, const LLSD& response) { S32 option = LLNotification::getSelectedOption(notification, response); if (option == 0) { LLPanelEstateInfo::sendEstateAccessDelta(ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY, notification["payload"]["avatar_id"].asUUID()); } else if (option == 1) { LLViewerRegion* regionp = gAgent.getRegion(); if (regionp) { U32 flags = ESTATE_ACCESS_BANNED_AGENT_ADD | ESTATE_ACCESS_ALLOWED_AGENT_REMOVE | ESTATE_ACCESS_NO_REPLY; if (regionp->getOwner() == gAgent.getID() || gAgent.isGodlike()) { flags |= ESTATE_ACCESS_APPLY_TO_ALL_ESTATES; } else if (regionp->isEstateManager()) { flags |= ESTATE_ACCESS_APPLY_TO_MANAGED_ESTATES; } LLPanelEstateInfo::sendEstateAccessDelta(flags, notification["payload"]["avatar_id"].asUUID()); } } return false; }
// static bool LLEnvManagerNew::canEditRegionSettings() { LLViewerRegion* region = gAgent.getRegion(); BOOL owner_or_god = gAgent.isGodlike() || (region && region->getOwner() == gAgent.getID()); BOOL owner_or_god_or_manager = owner_or_god || (region && region->isEstateManager()); LL_DEBUGS("Windlight") << "Can edit region settings: " << (bool) owner_or_god_or_manager << LL_ENDL; return owner_or_god_or_manager; }