Handle PERM_EXPORT in LLPermissions.

This moves all export test code to where it belongs:
in LLPermissions.

Added LLPermissions::allowExportBy, next to
allowModifyBy, allowCopyBy and allowMoveBy.
Then changed all code to use this call.

Because LLPermissions is part of llinventory, I had
to add a proxy for LFSimFeatureHandler.
Added a new class LFSimFeatureHandlerInterface that can be
used by LLPermissions to check simulator features by
accessing the LFSimFeatureHandler singleton.

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).

Export rules can now be easily made a function on
simulator features. If different rules apply for different
types (wearables, objects, mesh etc) then an extra variable
indicating the type will have to be passed though.
This commit is contained in:
Aleric Inglewood
2013-07-22 02:22:21 +02:00
parent 85ff52be30
commit 9c71afe73e
11 changed files with 58 additions and 59 deletions

View File

@@ -19,6 +19,7 @@
#define LFSIMFEATUREHANDLER_H
#include "llsingleton.h"
#include "llpermissions.h"
template<typename Type>
class SignaledType
@@ -45,7 +46,7 @@ private:
Type mValue;
};
class LFSimFeatureHandler : public LLSingleton<LFSimFeatureHandler>
class LFSimFeatureHandler : public LFSimFeatureHandlerInterface, public LLSingleton<LFSimFeatureHandler>
{
protected:
friend class LLSingleton<LFSimFeatureHandler>;
@@ -59,7 +60,7 @@ public:
boost::signals2::connection setSupportsExportCallback(const boost::signals2::signal<void()>::slot_type& slot);
// Accessors
bool simSupportsExport() const { return mSupportsExport; }
/*virtual*/ bool simSupportsExport() const { return mSupportsExport; }
private:
// SignaledTypes