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:
Aleric Inglewood
2013-08-13 02:31:30 +02:00
parent 11b904af36
commit d7d361004a
9 changed files with 26 additions and 10 deletions

View File

@@ -40,6 +40,12 @@ extern void mask_to_string(U32 mask, char* str);
extern std::string mask_to_string(U32 mask);
template<class T> class LLMetaClassT;
enum ExportPolicy {
ep_creator_only, // Used for SecondLife: only allow export when being creator.
ep_full_perm, // Used on non-SL grids that do not support the PERM_EXPORT bit: allow exporting of full perm objects.
ep_export_bit // Used on opensim grids that support the PERM_EXPORT bit.
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLPermissions
//
@@ -280,7 +286,7 @@ public:
// has that bit set and allow exporting even when this function returns false,
// or pass supports_export as true, which causes to perform that check using
// these permissions.
bool allowExportBy(LLUUID const& requester, bool supports_export = false) const;
bool allowExportBy(LLUUID const& requester, ExportPolicy export_policy) const;
// This somewhat specialized function is meant for testing if the
// current owner is allowed to transfer to the specified agent id.