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:
@@ -3165,7 +3165,8 @@ BOOL LLAgent::allowOperation(PermissionBit op,
|
||||
U8 god_minimum)
|
||||
{
|
||||
// Check god level.
|
||||
if (getGodLevel() >= god_minimum) return TRUE;
|
||||
// Singu note: We should never get here for PERM_EXPORT really, but if we do - then Gods are not above the law.
|
||||
if (getGodLevel() >= god_minimum && PERM_EXPORT != op) return TRUE;
|
||||
|
||||
if (!perm.isOwned()) return FALSE;
|
||||
|
||||
@@ -3187,7 +3188,8 @@ BOOL LLAgent::allowOperation(PermissionBit op,
|
||||
else
|
||||
{
|
||||
// Check for granted mod permissions.
|
||||
if ((PERM_OWNER != op) && isGrantedProxy(perm))
|
||||
// Singu note: do not allow proxy powers for exporting.
|
||||
if ((PERM_OWNER != op && PERM_EXPORT != op) && isGrantedProxy(perm))
|
||||
{
|
||||
agent_proxy = owner_id;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user