Move export permission check to LLPermissions, try two.

Removes code duplication.

Several parts of the code ignored the PERM_EXPORT but
and still did demand that things are full perm next
to being a creator. This has now changed the export
rules are the same for everything as they were for mesh:
you need to be the owner and the creator for every element
that is exported (not just the root prim, of course).
This commit is contained in:
Aleric Inglewood
2013-07-22 22:38:43 +02:00
parent be6699198f
commit dcf1cdbc4e
8 changed files with 41 additions and 53 deletions

View File

@@ -275,6 +275,13 @@ public:
inline bool allowCopyBy(const LLUUID& agent_id, const LLUUID& group) const;
inline bool allowMoveBy(const LLUUID &agent_id, const LLUUID &group) const;
// Returns true if export is allowed.
// If a grid supports PERM_EXPORT then they should also check if (any) element
// 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;
// This somewhat specialized function is meant for testing if the
// current owner is allowed to transfer to the specified agent id.
inline bool allowTransferTo(const LLUUID &agent_id) const;