Allow export full perm item on opensim if it doesn't support the export bit.
This addresses https://code.google.com/p/singularity-viewer/issues/detail?id=1003
This commit is contained in:
@@ -1099,8 +1099,11 @@ LLPermissions ll_permissions_from_sd(const LLSD& sd_perm)
|
||||
return rv;
|
||||
}
|
||||
|
||||
bool LLPermissions::allowExportBy(LLUUID const& requester, bool supports_export) const
|
||||
bool LLPermissions::allowExportBy(LLUUID const& requester, ExportPolicy export_policy) const
|
||||
{
|
||||
return !mIsGroupOwned && requester == mOwner && (requester == mCreator || (supports_export && (mMaskEveryone & PERM_EXPORT)));
|
||||
return !mIsGroupOwned && requester == mOwner && // Must be owner.
|
||||
(requester == mCreator || // Export is allowed for all export policies when creator.
|
||||
(export_policy == ep_export_bit && (mMaskEveryone & PERM_EXPORT)) || // If not creator, only allow export when PERM_EXPORT bit is set.
|
||||
(export_policy == ep_full_perm && (mMaskOwner & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED)); // If not creator, only allow export when item is full perm.
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user