\r
Date Dev Ver Change details\r
---------- --- ----- --------------\r
+2007-12-19 DP 1.8.1 Ensure the 'Create Rule' context menu option is always\r
+ offered when appropriate.\r
2007-12-19 DP 1.8.1 Prevent the user from trying to debug catalog objects.\r
2007-12-17 DP 1.8.1 Refresh the tree without erroring after creating a new\r
package on EnterpriseDB.\r
if(IsCollectionForType(PGM_OPCLASS) || IsCollectionForType(PGM_OPFAMILY))
return false;
- return GetSchema()->GetCreatePrivilege();
+ // TODO
+ // OK, this is a hack. Rules and Views are both derived from pgRuleObject, which
+ // is derived from pgSchemaObject. In order that they attached to the treeview
+ // under the relevant node however, the Schema object is actually the table or
+ // View (yeah, I know - I didn't write it :-p ). This works fine *except* for
+ // Get CreatePrivilege() which doesn't exist in these classes so must be fixed
+ // up at this level. This needs a major rethink in the longer term
+ if (GetSchema()->GetMetaType() == PGM_TABLE || GetSchema()->GetMetaType() == PGM_VIEW)
+ return GetSchema()->GetSchema()->GetCreatePrivilege();
+ else
+ return GetSchema()->GetCreatePrivilege();
}