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

@@ -1098,3 +1098,9 @@ LLPermissions ll_permissions_from_sd(const LLSD& sd_perm)
rv.fix();
return rv;
}
bool LLPermissions::allowExportBy(LLUUID const& requester, bool supports_export) const
{
return !mIsGroupOwned && requester == mOwner && (requester == mCreator || (supports_export && (mMaskEveryone & PERM_EXPORT)));
}