[Rt-commit] r10023 - in rt/branches/3.999-DANGEROUS: . docs/design_docs etc etc/upgrade/3.1.0 etc/upgrade/3.3.0 html/Admin/Elements html/Admin/Global/CustomFields html/Admin/Groups html/Admin/Queues html/Admin/Users html/Elements html/Ticket/Elements html/User lib lib/RT lib/RT/I18N lib/RT/Interface lib/RT/Model lib/RT/Shredder lib/RT/Shredder/Plugin lib/RT/URI t/api t/delegation t/mail

jesse at bestpractical.com jesse at bestpractical.com
Thu Dec 20 13:21:19 EST 2007


Author: jesse
Date: Thu Dec 20 13:21:19 2007
New Revision: 10023

Modified:
   rt/branches/3.999-DANGEROUS/   (props changed)
   rt/branches/3.999-DANGEROUS/docs/design_docs/3.3-schema-redesign.txt
   rt/branches/3.999-DANGEROUS/docs/design_docs/acls
   rt/branches/3.999-DANGEROUS/docs/design_docs/delegation
   rt/branches/3.999-DANGEROUS/docs/design_docs/groups_notes
   rt/branches/3.999-DANGEROUS/etc/schema.Informix
   rt/branches/3.999-DANGEROUS/etc/schema.Oracle
   rt/branches/3.999-DANGEROUS/etc/schema.Pg
   rt/branches/3.999-DANGEROUS/etc/schema.SQLite
   rt/branches/3.999-DANGEROUS/etc/schema.Sybase
   rt/branches/3.999-DANGEROUS/etc/schema.mysql
   rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.Informix
   rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.Oracle
   rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.Pg
   rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.SQLite
   rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.mysql
   rt/branches/3.999-DANGEROUS/etc/upgrade/3.3.0/schema.Oracle
   rt/branches/3.999-DANGEROUS/etc/upgrade/3.3.0/schema.Pg
   rt/branches/3.999-DANGEROUS/etc/upgrade/3.3.0/schema.mysql
   rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditCustomFields
   rt/branches/3.999-DANGEROUS/html/Admin/Elements/ObjectCustomFields
   rt/branches/3.999-DANGEROUS/html/Admin/Elements/QueueRightsForUser
   rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectRights
   rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Groups.html
   rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Queue-Tickets.html
   rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Queue-Transactions.html
   rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Users.html
   rt/branches/3.999-DANGEROUS/html/Admin/Groups/CustomFields.html
   rt/branches/3.999-DANGEROUS/html/Admin/Queues/CustomFields.html
   rt/branches/3.999-DANGEROUS/html/Admin/Users/CustomFields.html
   rt/branches/3.999-DANGEROUS/html/Admin/Users/Modify.html
   rt/branches/3.999-DANGEROUS/html/Elements/EditCustomField
   rt/branches/3.999-DANGEROUS/html/Ticket/Elements/FindAttachments
   rt/branches/3.999-DANGEROUS/html/Ticket/Elements/LoadTextAttachments
   rt/branches/3.999-DANGEROUS/html/User/Delegation.html
   rt/branches/3.999-DANGEROUS/html/User/Elements/DelegateRights
   rt/branches/3.999-DANGEROUS/html/User/Prefs.html
   rt/branches/3.999-DANGEROUS/lib/RT.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Bootstrap.pm
   rt/branches/3.999-DANGEROUS/lib/RT/CurrentUser.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Dispatcher.pm
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/cs.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/da.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/de.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/es.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/fi.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/fr.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/he.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/hu.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/id.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/it.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/ja.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/nl.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/no.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/pl.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/pt_br.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/ru.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/sv.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/tr.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/zh_cn.po
   rt/branches/3.999-DANGEROUS/lib/RT/I18N/zh_tw.po
   rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/ACECollection.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/AttachmentCollection.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/AttributeCollection.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValue.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValueCollection.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Principal.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Template.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/TransactionCollection.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/User.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Model/UserCollection.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
   rt/branches/3.999-DANGEROUS/lib/RT/SearchBuilder.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Shredder/Plugin/Summary.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Shredder/Record.pm
   rt/branches/3.999-DANGEROUS/lib/RT/Test.pm
   rt/branches/3.999-DANGEROUS/lib/RT/URI/fsck_com_rt.pm
   rt/branches/3.999-DANGEROUS/t/api/ace.t
   rt/branches/3.999-DANGEROUS/t/api/cf_transaction.t
   rt/branches/3.999-DANGEROUS/t/api/groups.t
   rt/branches/3.999-DANGEROUS/t/api/record.t
   rt/branches/3.999-DANGEROUS/t/api/rights.t
   rt/branches/3.999-DANGEROUS/t/api/ticket.t
   rt/branches/3.999-DANGEROUS/t/api/users.t
   rt/branches/3.999-DANGEROUS/t/delegation/cleanup_stalled.t
   rt/branches/3.999-DANGEROUS/t/delegation/revocation.t
   rt/branches/3.999-DANGEROUS/t/mail/gateway.t

Log:
 r73939 at pinglin:  jesse | 2007-12-19 21:56:11 -0500
  * no closer to working login


Modified: rt/branches/3.999-DANGEROUS/docs/design_docs/3.3-schema-redesign.txt
==============================================================================
--- rt/branches/3.999-DANGEROUS/docs/design_docs/3.3-schema-redesign.txt	(original)
+++ rt/branches/3.999-DANGEROUS/docs/design_docs/3.3-schema-redesign.txt	Thu Dec 20 13:21:19 2007
@@ -28,7 +28,7 @@
 TABLE ObjectCustomFieldValues (
   id INTEGER NOT NULL  AUTO_INCREMENT,
   CustomField int NOT NULL  ,
-  ObjectType varchar(255) NOT NULL,         -- Final target of the Object
+  object_type varchar(255) NOT NULL,         -- Final target of the Object
   object_id int NOT NULL  ,                  -- New: replaces the "Ticket" field
   SortOrder integer NOT NULL DEFAULT 0  ,   -- New: for Repeated fields
 
@@ -41,7 +41,7 @@
 
 TABLE Transactions (
   id INTEGER NOT NULL  AUTO_INCREMENT,
-  ObjectType varchar(255) NULL,             -- Final target of the Object
+  object_type varchar(255) NULL,             -- Final target of the Object
   object_id integer NOT NULL DEFAULT 0  ,    -- New: replaces the "Ticket" field
   TimeTaken integer NOT NULL DEFAULT 0  ,
   Type varchar(20) NULL  ,

Modified: rt/branches/3.999-DANGEROUS/docs/design_docs/acls
==============================================================================
--- rt/branches/3.999-DANGEROUS/docs/design_docs/acls	(original)
+++ rt/branches/3.999-DANGEROUS/docs/design_docs/acls	Thu Dec 20 13:21:19 2007
@@ -7,24 +7,24 @@
 # {{{ Which principals have right foo for object bar
 
 
-if ($args{'ObjectType'} eq 'Ticket') {
+if ($args{'object_type'} eq 'Ticket') {
      $or_check_ticket_roles = " OR ( Groups.Domain = 'TicketRole' AND Groups.Instance = '".$args{'object_id'}."') ";
      # If we're looking at ticket rights, we also want to look at the associated queue rights.
      # this is a little bit hacky, but basically, now that we've done the ticket roles magic, we load the queue object
      # and ask all the rest of our questions about the queue.
      my $tick = RT::Model::Ticket->new(current_user => RT->system_user);
      $tick->load($args{'object_id'});
-     $args{'ObjectType'} = 'Queue';
+     $args{'object_type'} = 'Queue';
      $args{'object_id'} = $tick->QueueObj->id();
 
 }
-if ($args{'ObjectType'} eq 'Queue') {
+if ($args{'object_type'} eq 'Queue') {
      $or_check_roles = " OR ( ( (Groups.Domain = 'QueueRole' AND Groups.Instance = '".$args{'object_id'}."') $or_check_ticket_roles ) 
                             AND Groups.Type = ACL.principal_type AND Groups.Id = Principals.object_id AND Principals.principal_type = 'Group') ";
 }
 
-if (defined $args{'ObjectType'} ) {
-     $or_look_at_object_rights = " OR (ACL.ObjectType = '".$args{'ObjectType'}."'  AND ACL.object_id = '".$args{'object_id'}."') ";
+if (defined $args{'object_type'} ) {
+     $or_look_at_object_rights = " OR (ACL.object_type = '".$args{'object_type'}."'  AND ACL.object_id = '".$args{'object_id'}."') ";
 
 }
 
@@ -33,8 +33,8 @@
         Principals.Id = CachedGroupMembers.GroupId AND 
         CachedGroupMembers.MemberId = UserPrinc.object_id AND 
         UserPrinc.principal_type = 'User'  AND
-        (ACL.Rightname = 'SuperUser' OR  ACL.Rightname = '$right') AND
-        (ACL.ObjectType = 'System' $or_look_at_object_rights) AND 
+        (ACL.right_name = 'SuperUser' OR  ACL.right_name = '$right') AND
+        (ACL.object_type = 'System' $or_look_at_object_rights) AND 
         (
                 (ACL.principal_id = Principals.Id AND 
                  Principals.object_id = Groups.Id AND 

Modified: rt/branches/3.999-DANGEROUS/docs/design_docs/delegation
==============================================================================
--- rt/branches/3.999-DANGEROUS/docs/design_docs/delegation	(original)
+++ rt/branches/3.999-DANGEROUS/docs/design_docs/delegation	Thu Dec 20 13:21:19 2007
@@ -18,7 +18,7 @@
        
 In user.pm
 
-=item has_right  { Right => 'somerightname', ObjectType => 'Group', object_id => 'GroupId'
+=item has_right  { Right => 'somerightname', object_type => 'Group', object_id => 'GroupId'
 
         Returns true if this user has the right 'somerightname' for
 the group with id 'Id'
@@ -26,11 +26,11 @@
 =cut
 
 
-=item RightsForObject { ObjectType => 'Group', object_id =>'GroupId' }
+=item RightsForObject { object_type => 'Group', object_id =>'GroupId' }
 
 in users.pm
 
-=item WhoHaveRight { Right =>'somerightname', ObjectType => 'Group', object_id => 'GroupId' }
+=item WhoHaveRight { Right =>'somerightname', object_type => 'Group', object_id => 'GroupId' }
 
 
         Finds all users who have the right 'somerightname' for the group

Modified: rt/branches/3.999-DANGEROUS/docs/design_docs/groups_notes
==============================================================================
--- rt/branches/3.999-DANGEROUS/docs/design_docs/groups_notes	(original)
+++ rt/branches/3.999-DANGEROUS/docs/design_docs/groups_notes	Thu Dec 20 13:21:19 2007
@@ -14,7 +14,7 @@
 CREATE TABLE ACL (
   id INTEGER NOT NULL  AUTO_INCREMENT,
   Principal integer NULL  , #Foreign key to principals
-  Rightname varchar(25) NULL  ,
+  right_name varchar(25) NULL  ,
   RightDomain varchar(25) NULL  ,
   RightInstance integer NULL  ,
   PRIMARY KEY (id)

Modified: rt/branches/3.999-DANGEROUS/etc/schema.Informix
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/schema.Informix	(original)
+++ rt/branches/3.999-DANGEROUS/etc/schema.Informix	Thu Dec 20 13:21:19 2007
@@ -103,7 +103,7 @@
 
 CREATE TABLE Transactions (
   	id 			SERIAL,
-  	ObjectType 		VARCHAR(255),
+  	object_type 		VARCHAR(255),
   	object_id 		INTEGER DEFAULT 0 NOT NULL,
   	TimeTaken 		INTEGER DEFAULT 0 NOT NULL,
   	Type 			VARCHAR(20),
@@ -118,7 +118,7 @@
   	Created 		DATETIME YEAR TO SECOND,
         PRIMARY KEY (id)
 );
-CREATE INDEX Transactions1 ON Transactions (ObjectType, object_id);
+CREATE INDEX Transactions1 ON Transactions (object_type, object_id);
 
 
 CREATE TABLE Scrips (
@@ -146,14 +146,14 @@
 	id 		SERIAL,
 	principal_type 	VARCHAR(25) NOT NULL,
 	principal_id 	INTEGER NOT NULL,
-	Rightname	VARCHAR(25) NOT NULL,
-	ObjectType	VARCHAR(25) NOT NULL,
+	right_name	VARCHAR(25) NOT NULL,
+	object_type	VARCHAR(25) NOT NULL,
 	object_id	INTEGER DEFAULT 0 NOT NULL,
 	DelegatedBy	INTEGER DEFAULT 0 NOT NULL,
 	DelegatedFrom	INTEGER DEFAULT 0 NOT NULL,
         PRIMARY KEY (id)
 );
-CREATE INDEX ACL1 ON ACL(Rightname, ObjectType, object_id, principal_type, principal_id);
+CREATE INDEX ACL1 ON ACL(right_name, object_type, object_id, principal_type, principal_id);
 
 
 CREATE TABLE GroupMembers (
@@ -342,7 +342,7 @@
 	Description 		VARCHAR(255) DEFAULT NULL,
   	Content 	BYTE,
 	ContentType	VARCHAR(16),
-	ObjectType	VARCHAR(25) NOT NULL,
+	object_type	VARCHAR(25) NOT NULL,
 	object_id	INTEGER DEFAULT 0 NOT NULL,
 	Creator 	INTEGER DEFAULT 0 NOT NULL,
   	Created 	DATETIME YEAR TO SECOND,
@@ -352,7 +352,7 @@
 ); 
 
 CREATE INDEX Attributes1 on Attributes(name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, object_id);
+CREATE INDEX Attributes2 on Attributes(object_type, object_id);
 
 
 CREATE TABLE sessions (

Modified: rt/branches/3.999-DANGEROUS/etc/schema.Oracle
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/schema.Oracle	(original)
+++ rt/branches/3.999-DANGEROUS/etc/schema.Oracle	Thu Dec 20 13:21:19 2007
@@ -106,7 +106,7 @@
 CREATE TABLE Transactions (
   	id 			NUMBER(11,0) 
 		CONSTRAINT Transactions_Key PRIMARY KEY,
-  	ObjectType 		VARCHAR2(255),
+  	object_type 		VARCHAR2(255),
   	object_id		NUMBER(11,0) DEFAULT 0 NOT NULL,
   	TimeTaken 		NUMBER(11,0) DEFAULT 0 NOT NULL,
   	Type 			VARCHAR2(20),
@@ -120,7 +120,7 @@
   	Creator 		NUMBER(11,0) DEFAULT 0 NOT NULL,
   	Created 		DATE
 );
-CREATE INDEX Transactions1 ON Transactions (ObjectType, object_id);
+CREATE INDEX Transactions1 ON Transactions (object_type, object_id);
 
 
 CREATE SEQUENCE SCRIPS_seq;
@@ -151,13 +151,13 @@
 		CONSTRAINT ACL_Key PRIMARY KEY,
 	principal_type 	VARCHAR2(25) NOT NULL,
 	principal_id 	NUMBER(11,0) NOT NULL,
-	Rightname	VARCHAR2(25) NOT NULL,
-	ObjectType	VARCHAR2(25) NOT NULL,
+	right_name	VARCHAR2(25) NOT NULL,
+	object_type	VARCHAR2(25) NOT NULL,
 	object_id	NUMBER(11,0) DEFAULT 0 NOT NULL,
 	DelegatedBy	NUMBER(11,0) DEFAULT 0 NOT NULL,
 	DelegatedFrom	NUMBER(11,0) DEFAULT 0 NOT NULL
 );
-CREATE INDEX ACL1 ON ACL(Rightname, ObjectType, object_id, principal_type, principal_id);
+CREATE INDEX ACL1 ON ACL(right_name, object_type, object_id, principal_type, principal_id);
 
 
 CREATE SEQUENCE GROUPMEMBERS_seq;
@@ -317,7 +317,7 @@
 	id		NUMBER(11,0) 
 		CONSTRAINT ObjectCustomFieldValues_Key PRIMARY KEY,
 	CustomField	NUMBER(11,0) NOT NULL,
-	ObjectType	VARCHAR2(25) NOT NULL,
+	object_type	VARCHAR2(25) NOT NULL,
 	object_id	NUMBER(11,0) DEFAULT 0 NOT NULL,
 	SortOrder	NUMBER(11,0) DEFAULT 0 NOT NULL,
 	Content		VARCHAR2(255),
@@ -332,7 +332,7 @@
 );
 
 CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (Content); 
-CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectType,object_id); 
+CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,object_type,object_id); 
 
 CREATE SEQUENCE customfields_seq;
 CREATE TABLE CustomFields (
@@ -377,7 +377,7 @@
 	Description 		VARCHAR2(255),
   	Content 	CLOB,
     ContentType VARCHAR(16),
-	ObjectType	VARCHAR2(25) NOT NULL,
+	object_type	VARCHAR2(25) NOT NULL,
 	object_id	NUMBER(11,0) DEFAULT 0 NOT NULL,
 	Creator 		NUMBER(11,0) DEFAULT 0 NOT NULL,
 	Created 		DATE,
@@ -386,7 +386,7 @@
 );
 
 CREATE INDEX Attributes1 on Attributes(name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, object_id);
+CREATE INDEX Attributes2 on Attributes(object_type, object_id);
 
 
 CREATE TABLE sessions (

Modified: rt/branches/3.999-DANGEROUS/etc/schema.Pg
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/schema.Pg	(original)
+++ rt/branches/3.999-DANGEROUS/etc/schema.Pg	Thu Dec 20 13:21:19 2007
@@ -183,7 +183,7 @@
 
 CREATE TABLE Transactions (
   id INTEGER DEFAULT nextval('transactions_id_seq'),
-  ObjectType varchar(255) NOT NULL  ,
+  object_type varchar(255) NOT NULL  ,
   object_id integer NOT NULL DEFAULT 0  ,
   TimeTaken integer NOT NULL DEFAULT 0  ,
   Type varchar(20) NULL  ,
@@ -200,7 +200,7 @@
   PRIMARY KEY (id)
 
 );
-CREATE INDEX Transactions1 ON Transactions (ObjectType, object_id);
+CREATE INDEX Transactions1 ON Transactions (object_type, object_id);
 
 -- }}}
 
@@ -251,8 +251,8 @@
   principal_type varchar(25) NOT NULL, 
 
   principal_id integer NOT NULL  , 
-  Rightname varchar(25) NOT NULL  ,
-  ObjectType varchar(25) NOT NULL  ,
+  right_name varchar(25) NOT NULL  ,
+  object_type varchar(25) NOT NULL  ,
   object_id integer NOT NULL DEFAULT 0,
   DelegatedBy integer NOT NULL DEFAULT 0, 
   DelegatedFrom integer NOT NULL DEFAULT 0, 
@@ -260,7 +260,7 @@
 
 );
 
-CREATE INDEX  ACL1 on ACL(Rightname, ObjectType, object_id,principal_type,principal_id);
+CREATE INDEX  ACL1 on ACL(right_name, object_type, object_id,principal_type,principal_id);
 
 
 -- }}}
@@ -489,7 +489,7 @@
 CREATE TABLE ObjectCustomFieldValues (
   id INTEGER DEFAULT nextval('objectcustomfieldvalues_id_s'),
   CustomField int NOT NULL  ,
-  ObjectType varchar(255) NULL  ,
+  object_type varchar(255) NULL  ,
   object_id int NOT NULL  ,
   SortOrder integer NOT NULL DEFAULT 0  ,
 
@@ -507,8 +507,8 @@
 
 );
 
-CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (CustomField,ObjectType,object_id,Content); 
-CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectType,object_id); 
+CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (CustomField,object_type,object_id,Content); 
+CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,object_type,object_id); 
 
 -- }}}
 
@@ -604,7 +604,7 @@
   Description varchar(255) NULL  ,
   Content text,
   ContentType varchar(16),
-  ObjectType varchar(64),
+  object_type varchar(64),
   object_id integer, 
   Creator integer NOT NULL DEFAULT 0  ,
   Created TIMESTAMP NULL  ,
@@ -615,7 +615,7 @@
 );
 
 CREATE INDEX Attributes1 on Attributes(name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, object_id);
+CREATE INDEX Attributes2 on Attributes(object_type, object_id);
 
 -- }}}
 

Modified: rt/branches/3.999-DANGEROUS/etc/schema.SQLite
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/schema.SQLite	(original)
+++ rt/branches/3.999-DANGEROUS/etc/schema.SQLite	Thu Dec 20 13:21:19 2007
@@ -112,7 +112,7 @@
 --- {{{ Transactions
 CREATE TABLE Transactions (
   id INTEGER PRIMARY KEY  ,
-  ObjectType varchar(255) NULL  ,
+  object_type varchar(255) NULL  ,
   object_id integer NULL  ,
   TimeTaken integer NULL  ,
   Type varchar(20) NULL  ,
@@ -128,7 +128,7 @@
   Created DATETIME NULL  
   
 ) ;
-CREATE INDEX Transactions1 ON Transactions (ObjectType, object_id);
+CREATE INDEX Transactions1 ON Transactions (object_type, object_id);
 
 --- }}}
 
@@ -162,8 +162,8 @@
   principal_type varchar(25) NOT NULL,
 
   principal_id INTEGER,
-  Rightname varchar(25) NOT NULL  ,
-  ObjectType varchar(25) NOT NULL  ,
+  right_name varchar(25) NOT NULL  ,
+  object_type varchar(25) NOT NULL  ,
   object_id INTEGER default 0,
   DelegatedBy integer NOT NULL default 0, 
   DelegatedFrom integer NOT NULL default 0
@@ -338,7 +338,7 @@
 CREATE TABLE ObjectCustomFieldValues (
   id INTEGER NOT NULL  ,
   CustomField int NOT NULL  ,
-  ObjectType varchar(255) NOT NULL,	    # Final target of the Object
+  object_type varchar(255) NOT NULL,	    # Final target of the Object
   object_id int NOT NULL  ,		    # New -- Replaces Ticket
   SortOrder integer NOT NULL DEFAULT 0  ,
 
@@ -356,7 +356,7 @@
 ) ;
 
 CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (Content); 
-CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectType,object_id); 
+CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,object_type,object_id); 
 
 # }}}
 
@@ -427,7 +427,7 @@
   Description varchar(255) NULL  ,
   Content LONGTEXT NULL  ,
   ContentType varchar(16),
-  ObjectType varchar(25) NOT NULL  ,
+  object_type varchar(25) NOT NULL  ,
   object_id INTEGER default 0,
   Creator integer NULL  ,
   Created DATETIME NULL  ,
@@ -436,7 +436,7 @@
  
 ) ;
 CREATE INDEX Attributes1 on Attributes(name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, object_id);
+CREATE INDEX Attributes2 on Attributes(object_type, object_id);
 
 --- }}}
 

Modified: rt/branches/3.999-DANGEROUS/etc/schema.Sybase
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/schema.Sybase	(original)
+++ rt/branches/3.999-DANGEROUS/etc/schema.Sybase	Thu Dec 20 13:21:19 2007
@@ -166,15 +166,15 @@
   principal_type varchar(25) NOT NULL, #"User" "Group", "Owner", "Cc" "AdminCc", "Requestor", "Requestor" 
 
   principal_id integer NOT NULL  , #Foreign key to principals
-  Rightname varchar(25) NOT NULL  ,
-  ObjectType varchar(25) NOT NULL  ,
+  right_name varchar(25) NOT NULL  ,
+  object_type varchar(25) NOT NULL  ,
   object_id integer NOT NULL ,
   DelegatedBy integer NOT NULL , #foreign key to principals with a userid
   DelegatedFrom integer NOT NULL , #foreign key to ACL
   PRIMARY KEY (id)
 ) ;
 
-CREATE INDEX  ACL1 on ACL(Rightname, ObjectType, object_id,principal_type,principal_id);
+CREATE INDEX  ACL1 on ACL(right_name, object_type, object_id,principal_type,principal_id);
 
 # }}}
 
@@ -415,7 +415,7 @@
   Description varchar(255) NULL  ,
   Content text,
   ContentType varchar(16),
-  ObjectType varchar(64),
+  object_type varchar(64),
   object_id integer, # foreign key to anything
   Creator integer NOT NULL   ,
   Created DATETIME NULL  ,
@@ -425,7 +425,7 @@
 ) ;
 
 CREATE INDEX Attributes1 on Attributes(name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, object_id);
+CREATE INDEX Attributes2 on Attributes(object_type, object_id);
 
 # }}}
 

Modified: rt/branches/3.999-DANGEROUS/etc/schema.mysql
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/schema.mysql	(original)
+++ rt/branches/3.999-DANGEROUS/etc/schema.mysql	Thu Dec 20 13:21:19 2007
@@ -117,7 +117,7 @@
 # {{{ Transactions
 CREATE TABLE Transactions (
   id INTEGER NOT NULL  AUTO_INCREMENT,
-  ObjectType varchar(64) NOT NULL,
+  object_type varchar(64) NOT NULL,
   object_id integer NOT NULL DEFAULT 0  ,
   TimeTaken integer NOT NULL DEFAULT 0  ,
   Type varchar(20) NULL  ,
@@ -133,7 +133,7 @@
   Created DATETIME NULL  ,
   PRIMARY KEY (id)
 ) TYPE=InnoDB;
-CREATE INDEX Transactions1 ON Transactions (ObjectType, object_id);
+CREATE INDEX Transactions1 ON Transactions (object_type, object_id);
 
 # }}}
 
@@ -167,15 +167,15 @@
   principal_type varchar(25) NOT NULL, #"User" "Group", "Owner", "Cc" "AdminCc", "Requestor", "Requestor" 
 
   principal_id integer NOT NULL  , #Foreign key to principals
-  Rightname varchar(25) NOT NULL  ,
-  ObjectType varchar(25) NOT NULL  ,
+  right_name varchar(25) NOT NULL  ,
+  object_type varchar(25) NOT NULL  ,
   object_id integer NOT NULL default 0,
   DelegatedBy integer NOT NULL default 0, #foreign key to principals with a userid
   DelegatedFrom integer NOT NULL default 0, #foreign key to ACL
   PRIMARY KEY (id)
 ) TYPE=InnoDB;
 
-CREATE INDEX  ACL1 on ACL(Rightname, ObjectType, object_id,principal_type,principal_id);
+CREATE INDEX  ACL1 on ACL(right_name, object_type, object_id,principal_type,principal_id);
 
 # }}}
 
@@ -343,7 +343,7 @@
 CREATE TABLE ObjectCustomFieldValues (
   id INTEGER NOT NULL  AUTO_INCREMENT,
   CustomField int NOT NULL  ,
-  ObjectType varchar(255) NOT NULL,	    # Final target of the Object
+  object_type varchar(255) NOT NULL,	    # Final target of the Object
   object_id int NOT NULL  ,		    # New -- Replaces Ticket
   SortOrder integer NOT NULL DEFAULT 0  ,   # New -- ordering for multiple values
 
@@ -361,7 +361,7 @@
 ) TYPE=InnoDB;
 
 CREATE INDEX ObjectCustomFieldValues1 ON ObjectCustomFieldValues (Content); 
-CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,ObjectType,object_id); 
+CREATE INDEX ObjectCustomFieldValues2 ON ObjectCustomFieldValues (CustomField,object_type,object_id); 
 
 # }}}
 
@@ -434,7 +434,7 @@
   Description varchar(255) NULL  ,
   Content text,
   ContentType varchar(16),
-  ObjectType varchar(64),
+  object_type varchar(64),
   object_id integer, # foreign key to anything
   Creator integer NOT NULL DEFAULT 0  ,
   Created DATETIME NULL  ,
@@ -444,7 +444,7 @@
 ) TYPE=InnoDB;
 
 CREATE INDEX Attributes1 on Attributes(name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, object_id);
+CREATE INDEX Attributes2 on Attributes(object_type, object_id);
 
 # }}}
 

Modified: rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.Informix
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.Informix	(original)
+++ rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.Informix	Thu Dec 20 13:21:19 2007
@@ -4,7 +4,7 @@
 	Description 		VARCHAR(255) DEFAULT NULL,
   	Content 	BYTE,
 	ContentType	VARCHAR(16),
-	ObjectType	VARCHAR(25) NOT NULL,
+	object_type	VARCHAR(25) NOT NULL,
 	object_id	INTEGER DEFAULT 0 NOT NULL,
 	Creator 	INTEGER DEFAULT 0 NOT NULL,
   	Created 	DATETIME YEAR TO SECOND,
@@ -14,4 +14,4 @@
 ); 
 
 CREATE INDEX Attributes1 on Attributes(name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, object_id);
+CREATE INDEX Attributes2 on Attributes(object_type, object_id);

Modified: rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.Oracle
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.Oracle	(original)
+++ rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.Oracle	Thu Dec 20 13:21:19 2007
@@ -5,7 +5,7 @@
 	Description 		VARCHAR2(255),
   	Content 	CLOB,
     ContentType VARCHAR(16),
-	ObjectType	VARCHAR2(25) NOT NULL,
+	object_type	VARCHAR2(25) NOT NULL,
 	object_id	NUMBER(11,0) DEFAULT 0 NOT NULL,
 	Creator 		NUMBER(11,0) DEFAULT 0 NOT NULL,
 	Created 		DATE,
@@ -14,4 +14,4 @@
 );
 
 CREATE INDEX Attributes1 on Attributes(name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, object_id);
+CREATE INDEX Attributes2 on Attributes(object_type, object_id);

Modified: rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.Pg
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.Pg	(original)
+++ rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.Pg	Thu Dec 20 13:21:19 2007
@@ -8,7 +8,7 @@
   Description varchar(255) NULL  ,
   Content text,
   ContentType varchar(16),
-  ObjectType varchar(64),
+  object_type varchar(64),
   object_id integer, 
   Creator integer NOT NULL DEFAULT 0  ,
   Created TIMESTAMP NULL  ,
@@ -19,7 +19,7 @@
 );
 
 CREATE INDEX Attributes1 on Attributes(name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, object_id);
+CREATE INDEX Attributes2 on Attributes(object_type, object_id);
 
 -- }}}
 

Modified: rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.SQLite
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.SQLite	(original)
+++ rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.SQLite	Thu Dec 20 13:21:19 2007
@@ -5,7 +5,7 @@
   Description varchar(255) NULL  ,
   Content LONGTEXT NULL  ,
   ContentType varchar(16),
-  ObjectType varchar(25) NOT NULL  ,
+  object_type varchar(25) NOT NULL  ,
   object_id INTEGER default 0,
   Creator integer NULL  ,
   Created DATETIME NULL  ,
@@ -15,7 +15,7 @@
 ) ;
 
 CREATE INDEX Attributes1 on Attributes(name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, object_id);
+CREATE INDEX Attributes2 on Attributes(object_type, object_id);
 
 --- }}}
 

Modified: rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.mysql
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.mysql	(original)
+++ rt/branches/3.999-DANGEROUS/etc/upgrade/3.1.0/schema.mysql	Thu Dec 20 13:21:19 2007
@@ -6,7 +6,7 @@
   Description varchar(255) NULL  ,
   Content text,
   ContentType varchar(16),
-  ObjectType varchar(64),
+  object_type varchar(64),
   object_id integer, # foreign key to anything
   Creator integer NOT NULL DEFAULT 0  ,
   Created DATETIME NULL  ,
@@ -16,6 +16,6 @@
 ) TYPE=InnoDB;
 
 CREATE INDEX Attributes1 on Attributes(name);
-CREATE INDEX Attributes2 on Attributes(ObjectType, object_id);
+CREATE INDEX Attributes2 on Attributes(object_type, object_id);
 
 # }}}

Modified: rt/branches/3.999-DANGEROUS/etc/upgrade/3.3.0/schema.Oracle
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/upgrade/3.3.0/schema.Oracle	(original)
+++ rt/branches/3.999-DANGEROUS/etc/upgrade/3.3.0/schema.Oracle	Thu Dec 20 13:21:19 2007
@@ -1,19 +1,19 @@
-alter Table Transactions ADD ObjectType VARCHAR2(64);
-UPDATE Transactions set ObjectType = 'RT::Model::Ticket';
-ALTER TABLE Transactions modify ObjectType NOT NULL;
+alter Table Transactions ADD object_type VARCHAR2(64);
+UPDATE Transactions set object_type = 'RT::Model::Ticket';
+ALTER TABLE Transactions modify object_type NOT NULL;
 ALTER TABLE Transactions drop column EffectiveTicket;
 ALTER TABLE Transactions ADD ReferenceType VARCHAR2(255) NULL;
 ALTER TABLE Transactions ADD OldReference NUMBER(11,0) NULL;      
 ALTER TABLE Transactions ADD NewReference NUMBER(11,0) NULL;
 DROP INDEX transactions1;            
 ALTER TABLE Transactions rename column Ticket to object_id;
-CREATE INDEX Transactions1 ON Transactions (ObjectType, object_id);
+CREATE INDEX Transactions1 ON Transactions (object_type, object_id);
 
 ALTER TABLE TicketCustomFieldValues rename to ObjectCustomFieldValues;
 ALTER TABLE ObjectCustomFieldValues  rename column Ticket to object_id;
-ALTER TABLE ObjectCustomFieldValues ADD ObjectType VARCHAR2(255);
-UPDATE ObjectCustomFieldValues set ObjectType = 'RT::Model::Ticket';
-ALTER TABLE ObjectCustomFieldValues MODIFY ObjectType NOT NULL;
+ALTER TABLE ObjectCustomFieldValues ADD object_type VARCHAR2(255);
+UPDATE ObjectCustomFieldValues set object_type = 'RT::Model::Ticket';
+ALTER TABLE ObjectCustomFieldValues MODIFY object_type NOT NULL;
 ALTER TABLE ObjectCustomFieldValues ADD disabled NUMBER(11,0);
 ALTER TABLE ObjectCustomFieldValues MODIFY disabled  default 0;  
 UPDATE ObjectCustomFieldValues SET disabled = 0;
@@ -25,8 +25,8 @@
 
 
 
-CREATE INDEX ObjectCustomFieldValues1 on ObjectCustomFieldValues (CustomField,ObjectType,object_id,Content); 
-CREATE INDEX ObjectCustomFieldValues2  on ObjectCustomFieldValues (CustomField,ObjectType,object_id); 
+CREATE INDEX ObjectCustomFieldValues1 on ObjectCustomFieldValues (CustomField,object_type,object_id,Content); 
+CREATE INDEX ObjectCustomFieldValues2  on ObjectCustomFieldValues (CustomField,object_type,object_id); 
 
 
 

Modified: rt/branches/3.999-DANGEROUS/etc/upgrade/3.3.0/schema.Pg
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/upgrade/3.3.0/schema.Pg	(original)
+++ rt/branches/3.999-DANGEROUS/etc/upgrade/3.3.0/schema.Pg	Thu Dec 20 13:21:19 2007
@@ -1,6 +1,6 @@
-alter Table Transactions ADD Column ObjectType varchar(64);
-update Transactions set ObjectType = 'RT::Model::Ticket';
-ALTER TABLE Transactions ALTER COLUMN ObjectType SET NOT NULL;
+alter Table Transactions ADD Column object_type varchar(64);
+update Transactions set object_type = 'RT::Model::Ticket';
+ALTER TABLE Transactions ALTER COLUMN object_type SET NOT NULL;
 alter table Transactions drop column EffectiveTicket;
 alter table Transactions add column ReferenceType varchar(255) NULL;
 alter table Transactions add column OldReference integer NULL;      
@@ -9,17 +9,17 @@
 alter table Transactions rename column Ticket to object_id;
 
 
-CREATE INDEX Transactions1 ON Transactions (ObjectType, object_id);
+CREATE INDEX Transactions1 ON Transactions (object_type, object_id);
 
 alter table TicketCustomFieldValues rename to ObjectCustomFieldValues;
 
 alter table ObjectCustomFieldValues  rename column Ticket to object_id;
 
-alter table objectcustomfieldvalues add column ObjectType varchar(255);
+alter table objectcustomfieldvalues add column object_type varchar(255);
 
-update objectcustomfieldvalues set ObjectType = 'RT::Model::Ticket';
+update objectcustomfieldvalues set object_type = 'RT::Model::Ticket';
 
-ALTER TABLE objectcustomfieldvalues ALTER COLUMN ObjectType SET NOT NULL;
+ALTER TABLE objectcustomfieldvalues ALTER COLUMN object_type SET NOT NULL;
 
 alter table objectcustomfieldvalues add column Current int;
 
@@ -33,9 +33,9 @@
 
 alter table objectcustomfieldvalues add column ContentEncoding varchar(80) NULL;
 
-create index ObjectCustomFieldValues1 on objectcustomfieldvalues (CustomField,ObjectType,object_id,Content); 
+create index ObjectCustomFieldValues1 on objectcustomfieldvalues (CustomField,object_type,object_id,Content); 
 
-create index ObjectCustomFieldValues2  on objectcustomfieldvalues (CustomField,ObjectType,object_id); 
+create index ObjectCustomFieldValues2  on objectcustomfieldvalues (CustomField,object_type,object_id); 
 
 
 CREATE SEQUENCE objectcustomfields_id_s;

Modified: rt/branches/3.999-DANGEROUS/etc/upgrade/3.3.0/schema.mysql
==============================================================================
--- rt/branches/3.999-DANGEROUS/etc/upgrade/3.3.0/schema.mysql	(original)
+++ rt/branches/3.999-DANGEROUS/etc/upgrade/3.3.0/schema.mysql	Thu Dec 20 13:21:19 2007
@@ -1,5 +1,5 @@
-alter Table Transactions ADD Column (ObjectType varchar(64) not null);
-update Transactions set ObjectType = 'RT::Model::Ticket';
+alter Table Transactions ADD Column (object_type varchar(64) not null);
+update Transactions set object_type = 'RT::Model::Ticket';
 alter table Transactions drop column EffectiveTicket;
 alter table Transactions add column ReferenceType varchar(255) NULL;
 alter table Transactions add column OldReference integer NULL;      
@@ -7,15 +7,15 @@
 alter table Transactions drop index transactions1;            
 alter table Transactions change Ticket object_id integer NOT NULL DEFAULT 0  ;
 
-CREATE INDEX Transactions1 ON Transactions (ObjectType, object_id);
+CREATE INDEX Transactions1 ON Transactions (object_type, object_id);
 
 alter table TicketCustomFieldValues rename ObjectCustomFieldValues;
 
 alter table ObjectCustomFieldValues  change Ticket object_id integer NOT NULL DEFAULT 0  ;
 
-alter table ObjectCustomFieldValues add column ObjectType varchar(255) not null;
+alter table ObjectCustomFieldValues add column object_type varchar(255) not null;
 
-update ObjectCustomFieldValues set ObjectType = 'RT::Model::Ticket';
+update ObjectCustomFieldValues set object_type = 'RT::Model::Ticket';
 
 alter table ObjectCustomFieldValues add column Current bool default 1;  
 
@@ -31,7 +31,7 @@
 
 alter table ObjectCustomFieldValues add index ObjectCustomFieldValues1 (Content); 
 
-alter table ObjectCustomFieldValues add index ObjectCustomFieldValues2 (CustomField,ObjectType,object_id); 
+alter table ObjectCustomFieldValues add index ObjectCustomFieldValues2 (CustomField,object_type,object_id); 
 
 
 CREATE TABLE ObjectCustomFields (

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditCustomFields
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditCustomFields	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/EditCustomFields	Thu Dec 20 13:21:19 2007
@@ -49,7 +49,7 @@
 
 <form action="<%RT->Config->Get('WebPath')%><% $m->request_comp->path |n %>" method="post" name="EditCustomFields">
 <input type="hidden" class="hidden" name="id" value="<% $Object->id || ''%>" />
-<input type="hidden" class="hidden" name="ObjectType" value="<% $ObjectType %>" />
+<input type="hidden" class="hidden" name="object_type" value="<% $object_type %>" />
 <input type="hidden" class="hidden" name="SubType" value="<% $SubType %>" />
 <input type="hidden" class="hidden" name="UpdateCFs" value="1" />
 
@@ -77,7 +77,7 @@
     return;
 }
 
-my $lookup = $ObjectType;
+my $lookup = $object_type;
 $lookup .= "-$SubType" if $SubType;
 
 $CustomFields->LimitToLookupType($lookup);
@@ -200,6 +200,6 @@
 $FinddisabledCustomFields => undef
 $UpdateCFs => 0
 $Object
-$ObjectType
+$object_type
 $SubType => ''
 </%ARGS>

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/ObjectCustomFields
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/ObjectCustomFields	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/ObjectCustomFields	Thu Dec 20 13:21:19 2007
@@ -61,15 +61,15 @@
 <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object &>
 <%INIT>
 # XXX TODO: Validate here?
-#$ObjectType =~ /^RT::(Queue|User|Group)$/
-#    or Abort(loc("Object of type [_1] cannot take custom fields", $ObjectType));
+#$object_type =~ /^RT::(Queue|User|Group)$/
+#    or Abort(loc("Object of type [_1] cannot take custom fields", $object_type));
 
 
 
 my $Type = $1;
 my $Types = $Type.'s';
 my $ObjectTabs;
-my $Object = $ObjectType->new(Jifty->web->current_user);
+my $Object = $object_type->new(Jifty->web->current_user);
 
 
 my $QualifiedType;
@@ -106,6 +106,6 @@
 </%INIT>
 <%ARGS>
 $id => undef
-$ObjectType
+$object_type
 $SubType => undef
 </%ARGS>

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/QueueRightsForUser
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/QueueRightsForUser	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/QueueRightsForUser	Thu Dec 20 13:21:19 2007
@@ -48,7 +48,7 @@
 <ul>
 %while(my $ACE = $ACL->next) {
 
-<li><checkbox name="delete_ace_<%$ACE->id%>" value="1"> <% loc($ACE->Rightname) %> (<%$ACE->user_object->real_name%>)
+<li><checkbox name="delete_ace_<%$ACE->id%>" value="1"> <% loc($ACE->right_name) %> (<%$ACE->user_object->real_name%>)
 
 %}
 </ul>

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectRights
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectRights	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Elements/SelectRights	Thu Dec 20 13:21:19 2007
@@ -56,9 +56,9 @@
 % } else {
 <i>(<&|/l&>Check box to revoke right</&>)</i> <br />
 % while (my $right = $ACLObj->next()) {
-% if ($right->Rightname) {
-% $current_rights{$right->Rightname} = 1;
-<input type="checkbox" class="checkbox" value="<% $right->Rightname %>" name="RevokeRight-<%$ACLDesc%>" /> <% loc($right->Rightname) %><br />
+% if ($right->right_name) {
+% $current_rights{$right->right_name} = 1;
+<input type="checkbox" class="checkbox" value="<% $right->right_name %>" name="RevokeRight-<%$ACLDesc%>" /> <% loc($right->right_name) %><br />
 % }
 %  }
 % }
@@ -98,7 +98,7 @@
 
     $ACLObj->LimitToObject( $Object);
     $ACLObj->LimitToPrincipal( Id => $principal_id);
-    $ACLObj->order_by(column=>'Rightname'); 
+    $ACLObj->order_by(column=>'right_name'); 
 
     if (ref($Object) && UNIVERSAL::can($Object, 'AvailableRights')) { 
         %Rights = %{$Object->AvailableRights};

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Groups.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Groups.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Groups.html	Thu Dec 20 13:21:19 2007
@@ -51,7 +51,7 @@
     current_subtab => "Admin/Global/CustomFields/Groups.html",
     Title => $title
     &>
-    <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Model::Group', Object=> $object &>
+    <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, object_type => 'RT::Model::Group', Object=> $object &>
 <%INIT>
   my $title = loc( 'Edit Custom Fields for all groups');
   my $object = RT::Model::Group->new(Jifty->web->current_user);

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Queue-Tickets.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Queue-Tickets.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Queue-Tickets.html	Thu Dec 20 13:21:19 2007
@@ -51,7 +51,7 @@
     current_subtab => "Admin/Global/CustomFields/Queue-Tickets.html",
     Title => $title
     &>
-    <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Model::Queue', Object=> $object, SubType => 'RT::Model::Ticket' &>
+    <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, object_type => 'RT::Model::Queue', Object=> $object, SubType => 'RT::Model::Ticket' &>
 <%INIT>
   my $title = loc( 'Edit Custom Fields for tickets in all queues');
   my $object = RT::Model::Queue->new(Jifty->web->current_user);

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Queue-Transactions.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Queue-Transactions.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Queue-Transactions.html	Thu Dec 20 13:21:19 2007
@@ -51,7 +51,7 @@
     current_subtab => "Admin/Global/CustomFields/Queue-Transactions.html",
     Title => $title
     &>
-    <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Model::Queue', Object=> $object, SubType => 'RT::Model::Ticket-RT::Model::Transaction' &>
+    <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, object_type => 'RT::Model::Queue', Object=> $object, SubType => 'RT::Model::Ticket-RT::Model::Transaction' &>
 <%INIT>
   my $title = loc( 'Edit Custom Fields for tickets in all queues');
   my $object = RT::Model::Queue->new(Jifty->web->current_user);

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Users.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Users.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Global/CustomFields/Users.html	Thu Dec 20 13:21:19 2007
@@ -51,7 +51,7 @@
     current_subtab => "Admin/Global/CustomFields/Users.html",
     Title => $title
     &>
-    <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, ObjectType => 'RT::Model::User', Object=> $object &>
+    <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, object_type => 'RT::Model::User', Object=> $object &>
 <%INIT>
   my $title = loc( 'Edit Custom Fields for all users');
   my $object = RT::Model::User->new(Jifty->web->current_user);

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Groups/CustomFields.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Groups/CustomFields.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Groups/CustomFields.html	Thu Dec 20 13:21:19 2007
@@ -45,4 +45,4 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<& /Admin/Elements/ObjectCustomFields, %ARGS, ObjectType => 'RT::Model::Group' &>
+<& /Admin/Elements/ObjectCustomFields, %ARGS, object_type => 'RT::Model::Group' &>

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Queues/CustomFields.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Queues/CustomFields.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Queues/CustomFields.html	Thu Dec 20 13:21:19 2007
@@ -54,7 +54,7 @@
     Title => $title
     &>
 
-    <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, ObjectType => 'RT::Model::Queue' &>
+    <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, object_type => 'RT::Model::Queue' &>
 <%INIT>
 my $Object = RT::Model::Queue->new( Jifty->web->current_user );
 

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Users/CustomFields.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Users/CustomFields.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Users/CustomFields.html	Thu Dec 20 13:21:19 2007
@@ -54,7 +54,7 @@
     Title => $title
     &>
 
-    <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, ObjectType => 'RT::Model::User' &>
+    <& /Admin/Elements/EditCustomFields, %ARGS, title => $title, Object => $Object, object_type => 'RT::Model::User' &>
 <%INIT>
 my $Object = RT::Model::User->new( Jifty->web->current_user );
 

Modified: rt/branches/3.999-DANGEROUS/html/Admin/Users/Modify.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Admin/Users/Modify.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/Admin/Users/Modify.html	Thu Dec 20 13:21:19 2007
@@ -369,7 +369,7 @@
     } elsif ( $Pass1 ne $Pass2 ) {
 	$password_not_set = 1;
         push @results, loc("passwords do not match.");
-    } elsif ( $Pass1 eq $Pass2 and !$user_object->Ispassword($Pass1) ) {
+    } elsif ( $Pass1 eq $Pass2 and !$user_object->is_password($Pass1) ) {
         my ($code, $msg) = $user_object->set_password($Pass1);
         push @results, loc_fuzzy($msg);
 	$password_not_set = 1 unless $code;

Modified: rt/branches/3.999-DANGEROUS/html/Elements/EditCustomField
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Elements/EditCustomField	(original)
+++ rt/branches/3.999-DANGEROUS/html/Elements/EditCustomField	Thu Dec 20 13:21:19 2007
@@ -57,7 +57,7 @@
 my $Values;
 if ( $Object && $Object->id ) {
     $Values = $Object->CustomFieldValues( $CustomField->id );
-    $Values->columns( qw( id CustomField ObjectType object_id disabled Content ContentType ContentEncoding ) );
+    $Values->columns( qw( id CustomField object_type object_id disabled Content ContentType ContentEncoding ) );
     $namePrefix ||= join('-', 'Object', ref($Object), $Object->id, 'CustomField', '');
 } elsif (not $Default) {
     my %TOP = $m->request_args;

Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Elements/FindAttachments
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Elements/FindAttachments	(original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Elements/FindAttachments	Thu Dec 20 13:21:19 2007
@@ -71,7 +71,7 @@
                         column2 => 'id' );
     
     $attachments->limit( alias => $transactions,
-                         column => 'ObjectType',
+                         column => 'object_type',
                         value => 'RT::Model::Ticket');
 if ($Tickets) {
     while ($Ticket = $Tickets->next) {

Modified: rt/branches/3.999-DANGEROUS/html/Ticket/Elements/LoadTextAttachments
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/Ticket/Elements/LoadTextAttachments	(original)
+++ rt/branches/3.999-DANGEROUS/html/Ticket/Elements/LoadTextAttachments	Thu Dec 20 13:21:19 2007
@@ -67,7 +67,7 @@
                         column2 => 'id' );
 
     $attachments->limit( alias => $transactions,
-                         column => 'ObjectType',
+                         column => 'object_type',
                         value => 'RT::Model::Ticket');
 
 

Modified: rt/branches/3.999-DANGEROUS/html/User/Delegation.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/User/Delegation.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/User/Delegation.html	Thu Dec 20 13:21:19 2007
@@ -53,9 +53,9 @@
 <& /Elements/ListActions, actions => \@results &>
 
 <form method="post">
-<& Elements/DelegateRights, personalgroups => $personalgroups, objects => $objects, ObjectType => 'RT::System' &>
-<& Elements/DelegateRights, personalgroups => $personalgroups, objects => $objects, ObjectType => 'RT::Model::Queue' &>
-<& Elements/DelegateRights, personalgroups => $personalgroups, objects => $objects, ObjectType => 'RT::Model::Group' &>
+<& Elements/DelegateRights, personalgroups => $personalgroups, objects => $objects, object_type => 'RT::System' &>
+<& Elements/DelegateRights, personalgroups => $personalgroups, objects => $objects, object_type => 'RT::Model::Queue' &>
+<& Elements/DelegateRights, personalgroups => $personalgroups, objects => $objects, object_type => 'RT::Model::Group' &>
 
 <& /Elements/Submit, Label => loc('Modify Rights') &>
 </form>
@@ -102,6 +102,6 @@
                        );
 
 while(my $right = $acl->next) {
-       push @{$objects->{$right->ObjectType}{$right->object_id}},$right;
+       push @{$objects->{$right->object_type}{$right->object_id}},$right;
 }
 </%INIT>

Modified: rt/branches/3.999-DANGEROUS/html/User/Elements/DelegateRights
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/User/Elements/DelegateRights	(original)
+++ rt/branches/3.999-DANGEROUS/html/User/Elements/DelegateRights	Thu Dec 20 13:21:19 2007
@@ -48,9 +48,9 @@
 <h2><%$sectionheading%></h2>
 <%perl>
 
-foreach my $object (keys %{$objects->{$ObjectType}}) {
-unless ($ObjectType eq 'RT::System') {
-my $object_obj = @{$objects->{$ObjectType}{$object}}[0]->Object;
+foreach my $object (keys %{$objects->{$object_type}}) {
+unless ($object_type eq 'RT::System') {
+my $object_obj = @{$objects->{$object_type}{$object}}[0]->Object;
 
 </%perl>
 <h3><% $object_obj->name %></h3>
@@ -64,7 +64,7 @@
 </tr>
 <%perl>
 my $i;
-foreach my $right (@{$objects->{$ObjectType}{$object}}) {
+foreach my $right (@{$objects->{$object_type}{$object}}) {
 my $delegations = RT::Model::ACECollection->new(Jifty->web->current_user);
 $delegations->DelegatedBy( Id => Jifty->web->current_user->principal_id);
 $delegations->DelegatedFrom ( Id => $right->id);
@@ -78,7 +78,7 @@
 %
 <tr class="<%($i%2) && 'oddline'%>">
 <td>
-<% loc($right->Rightname) %><br />
+<% loc($right->right_name) %><br />
 <div align="right"><font size="-2" color="#999999"><&|/l, $right->principal_object->Object->SelfDescription &>as granted to [_1]</&></font></div>
        </td>
 % while (my $pg = $personalgroups->next) {
@@ -96,14 +96,14 @@
 % }
 <%init>
 
-my $sectionheading = loc("[_1] rights", loc($ObjectType =~ /^RT::(.*)$/));
+my $sectionheading = loc("[_1] rights", loc($object_type =~ /^RT::(.*)$/));
 # 'System' # loc
 # 'Group'  # loc
 # 'Queue'  # loc
 
 </%init>
 <%args>
-$ObjectType => undef
+$object_type => undef
 $objects => undef
 $personalgroups => undef
 </%args>

Modified: rt/branches/3.999-DANGEROUS/html/User/Prefs.html
==============================================================================
--- rt/branches/3.999-DANGEROUS/html/User/Prefs.html	(original)
+++ rt/branches/3.999-DANGEROUS/html/User/Prefs.html	Thu Dec 20 13:21:19 2007
@@ -241,7 +241,7 @@
 
 
 #TODO: make this report errors properly
-if ((defined $Pass1) and ($Pass1 ne '') and ($Pass1 eq $Pass2) and (!$user_object->Ispassword($Pass1))) {
+if ((defined $Pass1) and ($Pass1 ne '') and ($Pass1 eq $Pass2) and (!$user_object->is_password($Pass1))) {
     my ($code, $msg);
     ($code, $msg) = $user_object->set_password($Pass1);
     push @results, loc('password: [_1]', loc_fuzzy($msg));

Modified: rt/branches/3.999-DANGEROUS/lib/RT.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT.pm	Thu Dec 20 13:21:19 2007
@@ -302,8 +302,7 @@
 sub InitSystemObjects {
 
     #RT's "nobody user" is a genuine database user. its ID lives here.
-    $Nobody = new RT::CurrentUser;
-    $Nobody->load_by_name('Nobody');
+    $Nobody = RT::CurrentUser->new(name => 'Nobody');
     Carp::confess "Could not load 'Nobody' User. This usually indicates a corrupt or missing RT database" unless $Nobody->id;
 
 

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Bootstrap.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Bootstrap.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Bootstrap.pm	Thu Dec 20 13:21:19 2007
@@ -274,8 +274,8 @@
     $superuser_ace->_bootstrap_create(
         principal_id   => ACLEquivGroupId( $current_user->id ),
         principal_type => 'Group',
-        Rightname     => 'SuperUser',
-        ObjectType    => 'RT::System',
+        right_name     => 'SuperUser',
+        object_type    => 'RT::System',
         object_id      => 1,
     );
 

Modified: rt/branches/3.999-DANGEROUS/lib/RT/CurrentUser.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/CurrentUser.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/CurrentUser.pm	Thu Dec 20 13:21:19 2007
@@ -254,9 +254,8 @@
     return ($password eq $auth_digest);
 }
 
-eval "require RT::CurrentUser_Vendor";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/CurrentUser_Vendor.pm});
-eval "require RT::CurrentUser_Local";
-die $@ if ($@ && $@ !~ qr{^Can't locate RT/CurrentUser_Local.pm});
+sub has_right {
+    shift->user_object->has_right(@_);
+}
 
 1;

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Dispatcher.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Dispatcher.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Dispatcher.pm	Thu Dec 20 13:21:19 2007
@@ -34,9 +34,6 @@
     my $path = $1;
 # This code canonicalize_s time inputs in hours into minutes
 # If it's a noauth file, don't ask for auth.
-if ( $path !~ RT->Config->Get('WebNoAuthRegex') && $path ne '/login' && !Jifty->web->current_user->id ) {
-    tangent('/login');
-}
 
     # Set the proper encoding for the current language handle
     content_type("text/html; charset=utf-8");

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/cs.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/cs.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/cs.po	Thu Dec 20 13:21:19 2007
@@ -51,7 +51,7 @@
 msgstr "$prefix %1"
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr "%1 #%2"
 
@@ -280,7 +280,7 @@
 msgstr "%1 objekty"
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "práva %1"
 
@@ -3667,7 +3667,7 @@
 msgstr "Objekt smazán"
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr "Objektu typu %1 nemohou být přiděleny uživatelské položky"

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/da.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/da.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/da.po	Thu Dec 20 13:21:19 2007
@@ -53,7 +53,7 @@
 msgid "$prefix %1"
 msgstr "$præfiks %1"
 
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 #: lib/RT/URI/fsck_com_rt.pm:256
 msgid "%1 #%2"
 msgstr "%1 #%2"
@@ -304,7 +304,7 @@
 msgid "%1 objects"
 msgstr "%1 objekter"
 
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 #: html/User/Elements/DelegateRights:97
 msgid "%1 rights"
 msgstr "%1 rettigheder"
@@ -4099,7 +4099,7 @@
 msgstr "Objekt slettet"
 
 #. ($LookupType)
-#. ($ObjectType)
+#. ($object_type)
 #: html/Admin/CustomFields/Objects.html:72
 #: html/Admin/Elements/ObjectCustomFields:63
 msgid "Object of type %1 cannot take custom fields"

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/de.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/de.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/de.po	Thu Dec 20 13:21:19 2007
@@ -52,7 +52,7 @@
 msgstr "$prefix %1"
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr "%1 #%2"
 
@@ -268,7 +268,7 @@
 msgstr "%1 Objekte"
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "%1 Rechte"
 
@@ -3256,7 +3256,7 @@
 msgstr "Objekt gelöscht"
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr "Objekt vom Typ %1 kann keine benutzerdefinierten Felder haben"

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/es.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/es.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/es.po	Thu Dec 20 13:21:19 2007
@@ -51,7 +51,7 @@
 msgstr ""
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr ""
 
@@ -292,7 +292,7 @@
 msgstr "%1 ibjetos"
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "%1 privilegios"
 
@@ -3889,7 +3889,7 @@
 msgstr "Objeto borrado"
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr "Objeto de tipo %1 no puede llevar campos personalizados"

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/fi.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/fi.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/fi.po	Thu Dec 20 13:21:19 2007
@@ -44,7 +44,7 @@
 msgstr ""
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr ""
 
@@ -277,7 +277,7 @@
 msgstr ""
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr ""
 
@@ -3699,7 +3699,7 @@
 msgstr ""
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr ""

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/fr.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/fr.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/fr.po	Thu Dec 20 13:21:19 2007
@@ -54,7 +54,7 @@
 msgstr "$prefix %1"
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr "%1 n°%2"
 
@@ -243,7 +243,7 @@
 msgstr "%1 objets"
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "droits de %1"
 
@@ -3070,7 +3070,7 @@
 msgstr "Objet effacé"
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr "Les objets de type %1 ne peuvent avoir de champs personnalisés"

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/he.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/he.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/he.po	Thu Dec 20 13:21:19 2007
@@ -42,7 +42,7 @@
 msgstr ""
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr ""
 
@@ -239,7 +239,7 @@
 msgstr ""
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "זכויות"
 
@@ -3189,7 +3189,7 @@
 msgstr ""
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr ""

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/hu.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/hu.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/hu.po	Thu Dec 20 13:21:19 2007
@@ -43,7 +43,7 @@
 msgstr ""
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr ""
 
@@ -235,7 +235,7 @@
 msgstr ""
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "%1 jogok"
 
@@ -3084,7 +3084,7 @@
 msgstr "Objektum törölve"
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr ""

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/id.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/id.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/id.po	Thu Dec 20 13:21:19 2007
@@ -44,7 +44,7 @@
 msgstr "$Awalan %1"
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr "%1 #%2"
 
@@ -245,7 +245,7 @@
 msgstr "%1 objek"
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "hak-hak %1"
 
@@ -3279,7 +3279,7 @@
 msgstr "Objek sudah dihapus"
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr "Tipe Objek %1 tidak dapat mengambil kolom kustom"

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/it.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/it.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/it.po	Thu Dec 20 13:21:19 2007
@@ -51,7 +51,7 @@
 msgstr ""
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr "%1 n°%2"
 
@@ -292,7 +292,7 @@
 msgstr "%1 oggetti"
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "Diritti su %1"
 
@@ -3978,7 +3978,7 @@
 msgstr "Oggetto cancellato"
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr "Oggetto di tipo %1 non accetta campi personalizzati"

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/ja.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/ja.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/ja.po	Thu Dec 20 13:21:19 2007
@@ -46,7 +46,7 @@
 msgstr ""
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr ""
 
@@ -271,7 +271,7 @@
 msgstr ""
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr ""
 
@@ -3519,7 +3519,7 @@
 msgstr ""
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr ""

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/nl.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/nl.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/nl.po	Thu Dec 20 13:21:19 2007
@@ -50,7 +50,7 @@
 msgstr ""
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr ""
 
@@ -283,7 +283,7 @@
 msgstr "%1 objecten"
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "%1 rechten"
 
@@ -3693,7 +3693,7 @@
 msgstr ""
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr ""

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/no.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/no.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/no.po	Thu Dec 20 13:21:19 2007
@@ -51,7 +51,7 @@
 msgstr "$prefix %1"
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr ""
 
@@ -292,7 +292,7 @@
 msgstr ""
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "%1 rettigheter"
 
@@ -3934,7 +3934,7 @@
 msgstr ""
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr ""

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/pl.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/pl.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/pl.po	Thu Dec 20 13:21:19 2007
@@ -48,7 +48,7 @@
 msgstr ""
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr "%1 nr%2"
 
@@ -302,7 +302,7 @@
 msgstr "%1 objets"
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "%1 - uprawnienia"
 
@@ -4009,7 +4009,7 @@
 msgstr ""
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr ""

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/pt_br.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/pt_br.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/pt_br.po	Thu Dec 20 13:21:19 2007
@@ -47,7 +47,7 @@
 msgstr ""
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr ""
 
@@ -288,7 +288,7 @@
 msgstr ""
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "%1 direitos"
 
@@ -3914,7 +3914,7 @@
 msgstr ""
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr ""

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/ru.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/ru.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/ru.po	Thu Dec 20 13:21:19 2007
@@ -52,7 +52,7 @@
 msgstr ""
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr ""
 
@@ -293,7 +293,7 @@
 msgstr "%1 объектов"
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "Права %1"
 
@@ -4008,7 +4008,7 @@
 msgstr "Объект удален"
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr "Тип объекта %1 не может содержать дополнительные поля"

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/sv.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/sv.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/sv.po	Thu Dec 20 13:21:19 2007
@@ -45,7 +45,7 @@
 msgid "$prefix %1"
 msgstr "$prefix %1"
 
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 #: lib/RT/URI/fsck_com_rt.pm:256
 msgid "%1 #%2"
 msgstr "%1 #%2"
@@ -248,7 +248,7 @@
 msgid "%1 objects"
 msgstr "%1 objekt"
 
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 #: html/User/Elements/DelegateRights:97
 msgid "%1 rights"
 msgstr "%1 rättigheter"
@@ -3397,7 +3397,7 @@
 msgstr "Objekt har raderats"
 
 #. ($LookupType)
-#. ($ObjectType)
+#. ($object_type)
 #: html/Admin/CustomFields/Objects.html:72
 #: html/Admin/Elements/ObjectCustomFields:63
 msgid "Object of type %1 cannot take custom fields"

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/tr.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/tr.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/tr.po	Thu Dec 20 13:21:19 2007
@@ -44,7 +44,7 @@
 msgstr ""
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr ""
 
@@ -229,7 +229,7 @@
 msgstr "%1 nesne"
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "%1 hak"
 
@@ -3038,7 +3038,7 @@
 msgstr "Nesne silindi"
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr "%1 türündeki nesneler, özel alanlar alamazlar"

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/zh_cn.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/zh_cn.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/zh_cn.po	Thu Dec 20 13:21:19 2007
@@ -62,7 +62,7 @@
 msgstr "%*(%1) 件尚未解决的申请单"
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr "%1 #%2"
 
@@ -323,7 +323,7 @@
 msgstr "找到 %1 项结果"
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "%1权限"
 
@@ -5033,7 +5033,7 @@
 msgstr ""
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr "自订字段不适用于类别为 %1 的对象"

Modified: rt/branches/3.999-DANGEROUS/lib/RT/I18N/zh_tw.po
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/I18N/zh_tw.po	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/I18N/zh_tw.po	Thu Dec 20 13:21:19 2007
@@ -62,7 +62,7 @@
 msgstr "%*(%1) 件尚未解決的申請單"
 
 #: lib/RT/URI/fsck_com_rt.pm:256
-#. ($self->ObjectType, $self->Object->id)
+#. ($self->object_type, $self->Object->id)
 msgid "%1 #%2"
 msgstr "%1 #%2"
 
@@ -323,7 +323,7 @@
 msgstr "找到 %1 項結果"
 
 #: html/User/Elements/DelegateRights:97
-#. (loc($ObjectType =~ /^RT::(.*)$/))
+#. (loc($object_type =~ /^RT::(.*)$/))
 msgid "%1 rights"
 msgstr "%1權限"
 
@@ -5033,7 +5033,7 @@
 msgstr ""
 
 #: html/Admin/CustomFields/Objects.html:72 html/Admin/Elements/ObjectCustomFields:63
-#. ($ObjectType)
+#. ($object_type)
 #. ($LookupType)
 msgid "Object of type %1 cannot take custom fields"
 msgstr "自訂欄位不適用於類別為 %1 的物件"

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Interface/Email.pm	Thu Dec 20 13:21:19 2007
@@ -365,7 +365,7 @@
     }
 
     if ( $args{'Transaction'} && !$args{'Ticket'}
-        && $args{'Transaction'}->ObjectType eq 'RT::Model::Ticket' )
+        && $args{'Transaction'}->object_type eq 'RT::Model::Ticket' )
     {
         $args{'Ticket'} = $args{'Transaction'}->Object;
     }

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ACE.pm	Thu Dec 20 13:21:19 2007
@@ -78,8 +78,8 @@
 use Jifty::DBI::Record schema {
     column principal_type => max_length is 25, type is 'varchar(25)', default is '';
     column principal_id => type is 'int(11)', default is '0';
-    column Rightname => max_length is 25, type is 'varchar(25)', default is '';
-    column ObjectType => max_length is 25, type is 'varchar(25)', default is '';
+    column right_name => max_length is 25, type is 'varchar(25)', default is '';
+    column object_type => max_length is 25, type is 'varchar(25)', default is '';
     column object_id      => type is 'int(11)', default is '0';
     column DelegatedBy   => type is 'int(11)', default is '0';
     column DelegatedFrom => type is 'int(11)', default is '0';
@@ -129,7 +129,7 @@
 
               principal_id => undef,
               principal_type => undef,
-	      Rightname => undef,
+	      right_name => undef,
 
         And either:
 
@@ -137,7 +137,7 @@
 
             OR
 
-	      ObjectType => undef,
+	      object_type => undef,
 	      object_id => undef
 
 =cut
@@ -146,10 +146,10 @@
     my $self = shift;
     my %args = ( principal_id   => undef,
                  principal_type => undef,
-                 Rightname     => undef,
+                 right_name     => undef,
                  Object    => undef,
                  object_id    => undef,
-                 ObjectType    => undef,
+                 object_type    => undef,
                  @_ );
 
     my $princ_obj;
@@ -170,8 +170,8 @@
 
     $self->load_by_cols( principal_id   => $princ_obj->id,
                        principal_type => $args{'principal_type'},
-                       Rightname     => $args{'Rightname'},
-                       ObjectType    => $object_type,
+                       right_name     => $args{'right_name'},
+                       object_type    => $object_type,
                        object_id      => $object_id);
 
     #If we couldn't load it.
@@ -194,7 +194,7 @@
 
    principal_id => The id of an RT::Model::Principal object
    principal_type => "User" "Group" or any Role type
-   Rightname => the name of a right. in any case
+   right_name => the name of a right. in any case
    DelegatedBy => The Principal->id of the user delegating the right
    DelegatedFrom => The id of the ACE which this new ACE is delegated from
 
@@ -206,7 +206,7 @@
 
         OR
 
-   ObjectType => the type of the object in question (ref ($object))
+   object_type => the type of the object in question (ref ($object))
    object_id => the id of the object in question $object->id
 
 
@@ -222,20 +222,20 @@
     my %args = (
         principal_id   => undef,
         principal_type => undef,
-        Rightname     => undef,
+        right_name     => undef,
         Object        => undef,
         @_
     );
 
-    unless ( $args{'Rightname'} ) {
+    unless ( $args{'right_name'} ) {
         return ( 0, $self->loc('No right specified') );
     }
 
     #if we haven't specified any sort of right, we're talking about a global right
-    if (!defined $args{'Object'} && !defined $args{'object_id'} && !defined $args{'ObjectType'}) {
+    if (!defined $args{'Object'} && !defined $args{'object_id'} && !defined $args{'object_type'}) {
         $args{'Object'} = RT->system;
     }
-    ($args{'Object'}, $args{'ObjectType'}, $args{'object_id'}) = $self->_ParseObjectArg( %args );
+    ($args{'Object'}, $args{'object_type'}, $args{'object_id'}) = $self->_ParseObjectArg( %args );
     unless( $args{'Object'} ) {
 	return ( 0, $self->loc("System error. Right not granted.") );
     }
@@ -272,17 +272,17 @@
     # }}}
 
     # {{{ canonicalize_ and check the right name
-    my $canonic_name = $self->canonicalize_Rightname( $args{'Rightname'} );
+    my $canonic_name = $self->canonicalize_right_name( $args{'right_name'} );
     unless ( $canonic_name ) {
-        return ( 0, $self->loc("Invalid right. Couldn't canonicalize_ right '$args{'Rightname'}'") );
+        return ( 0, $self->loc("Invalid right. Couldn't canonicalize_ right '$args{'right_name'}'") );
     }
-    $args{'Rightname'} = $canonic_name;
+    $args{'right_name'} = $canonic_name;
 
-    #check if it's a valid Rightname
+    #check if it's a valid right_name
     if ( $args{'Object'}->can('AvailableRights') ) {
-        unless ( exists $args{'Object'}->AvailableRights->{ $args{'Rightname'} } ) {
+        unless ( exists $args{'Object'}->AvailableRights->{ $args{'right_name'} } ) {
             $RT::Logger->warning(
-                "Couldn't validate right name '$args{'Rightname'}'"
+                "Couldn't validate right name '$args{'right_name'}'"
                 ." for object of ". ref( $args{'Object'} ) ." class"
             );
             return ( 0, $self->loc('Invalid right') );
@@ -293,8 +293,8 @@
     # Make sure the right doesn't already exist.
     $self->load_by_cols( principal_id   => $princ_obj->id,
                        principal_type => $args{'principal_type'},
-                       Rightname     => $args{'Rightname'},
-                       ObjectType    => $args{'ObjectType'},
+                       right_name     => $args{'right_name'},
+                       object_type    => $args{'object_type'},
                        object_id      => $args{'object_id'},
                        DelegatedBy   => 0,
                        DelegatedFrom => 0 );
@@ -304,8 +304,8 @@
 
     my $id = $self->SUPER::create( principal_id   => $princ_obj->id,
                                    principal_type => $args{'principal_type'},
-                                   Rightname     => $args{'Rightname'},
-                                   ObjectType    => ref( $args{'Object'} ),
+                                   right_name     => $args{'right_name'},
+                                   object_type    => ref( $args{'Object'} ),
                                    object_id      => $args{'Object'}->id,
                                    DelegatedBy   => 0,
                                    DelegatedFrom => 0 );
@@ -392,8 +392,8 @@
     # Make sure the right doesn't already exist.
     $delegated_ace->load_by_cols( principal_id   => $princ_obj->id,
                                 principal_type => 'Group',
-                                Rightname     => $self->__value('Rightname'),
-                                ObjectType    => $self->__value('ObjectType'),
+                                right_name     => $self->__value('right_name'),
+                                object_type    => $self->__value('object_type'),
                                 object_id      => $self->__value('object_id'),
                                 DelegatedBy => $self->current_user->principal_id,
                                 DelegatedFrom => $self->id );
@@ -403,8 +403,8 @@
     my $id = $delegated_ace->SUPER::create(
         principal_id   => $princ_obj->id,
         principal_type => 'Group',          # do we want to hardcode this?
-        Rightname     => $self->__value('Rightname'),
-        ObjectType    => $self->__value('ObjectType'),
+        right_name     => $self->__value('right_name'),
+        object_type    => $self->__value('object_type'),
         object_id      => $self->__value('object_id'),
         DelegatedBy   => $self->current_user->principal_id,
         DelegatedFrom => $self->id );
@@ -486,8 +486,8 @@
 
     # If we're revoking delegation rights (see above), we may need to
     # revoke all rights delegated by the recipient.
-    if ($val and ($self->Rightname() eq 'DelegateRights' or
-		  $self->Rightname() eq 'SuperUser')) {
+    if ($val and ($self->right_name() eq 'DelegateRights' or
+		  $self->right_name() eq 'SuperUser')) {
 	$val = $self->principal_object->_CleanupInvalidDelegations( InsideTransaction => 1 );
     }
 
@@ -545,16 +545,16 @@
 
 # }}}
 
-# {{{ sub canonicalize_Rightname
+# {{{ sub canonicalize_right_name
 
-=head2 canonicalize_Rightname <RIGHT>
+=head2 canonicalize_right_name <RIGHT>
 
 Takes a queue or system right name in any case and returns it in
 the correct case. If it's not found, will return undef.
 
 =cut
 
-sub canonicalize_Rightname {
+sub canonicalize_right_name {
     my $self  = shift;
     return $LOWERCASERIGHTnameS{ lc shift };
 }
@@ -582,9 +582,9 @@
 
     my $appliesto_obj;
 
-    if ($self->__value('ObjectType') && $OBJECT_TYPES{$self->__value('ObjectType')} ) {
-        $appliesto_obj =  $self->__value('ObjectType')->new;
-        unless (ref( $appliesto_obj) eq $self->__value('ObjectType')) {
+    if ($self->__value('object_type') && $OBJECT_TYPES{$self->__value('object_type')} ) {
+        $appliesto_obj =  $self->__value('object_type')->new;
+        unless (ref( $appliesto_obj) eq $self->__value('object_type')) {
             return undef;
         }
         $appliesto_obj->load( $self->__value('object_id') );
@@ -593,7 +593,7 @@
     else {
         $RT::Logger->warning( "$self -> Object called for an object "
                               . "of an unknown type:"
-                              . $self->__value('ObjectType') );
+                              . $self->__value('object_type') );
         return (undef);
     }
 }
@@ -709,13 +709,13 @@
     my %args = (
         Object     => undef,
         object_id   => undef,
-        ObjectType => undef,
+        object_type => undef,
         @_
     );
 
-    if ( $args{'Object'} && ( $args{'object_id'} || $args{'ObjectType'} ) ) {
+    if ( $args{'Object'} && ( $args{'object_id'} || $args{'object_type'} ) ) {
         $RT::Logger->crit(
-            "Method called with an ObjectType or an object_id and Object args"
+            "Method called with an object_type or an object_id and Object args"
         );
         return ();
     } elsif ( $args{'Object'} && !UNIVERSAL::can( $args{'Object'}, 'id' ) ) {
@@ -724,8 +724,8 @@
     } elsif ( $args{'Object'} ) {
         my $obj = $args{'Object'};
         return ( $obj, ref $obj, $obj->id );
-    } elsif ( $args{'ObjectType'} ) {
-        my $obj = $args{'ObjectType'}->new;
+    } elsif ( $args{'object_type'} ) {
+        my $obj = $args{'object_type'}->new;
         $obj->load( $args{'object_id'} );
         return ( $obj, ref $obj, $obj->id );
     } else {

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ACECollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ACECollection.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ACECollection.pm	Thu Dec 20 13:21:19 2007
@@ -95,7 +95,7 @@
         return undef;
     }
     $self->limit(
-        column           => 'ObjectType',
+        column           => 'object_type',
         operator        => '=',
         value           => ref($obj),
         entry_aggregator => 'OR'
@@ -131,7 +131,7 @@
     {
         return undef;
     }
-    $self->limit( column => 'ObjectType',
+    $self->limit( column => 'object_type',
 		  operator => '!=',
 		  value => ref($obj),
 		  entry_aggregator => 'OR',
@@ -326,7 +326,7 @@
     my $self = shift;
 
     while (my $entry = $self->next) {
-       my $hashkey = $entry->__value('ObjectType'). "-" .  $entry->__value('object_id'). "-" .  $entry->__value('Rightname'). "-" .  $entry->__value('principal_id'). "-" .  $entry->__value('principal_type');
+       my $hashkey = $entry->__value('object_type'). "-" .  $entry->__value('object_id'). "-" .  $entry->__value('right_name'). "-" .  $entry->__value('principal_id'). "-" .  $entry->__value('principal_type');
 
         $self->{'as_hash'}->{"$hashkey"} =1;
 
@@ -345,7 +345,7 @@
     my $self = shift;
     my %args = ( RightScope => undef,
                  RightAppliesTo => undef,
-                 Rightname => undef,
+                 right_name => undef,
                  principal_id => undef,
                  principal_type => undef,
                  @_ );
@@ -355,7 +355,7 @@
 
     if ($self->{'as_hash'}->{ $args{'RightScope'} . "-" .
 			      $args{'RightAppliesTo'} . "-" . 
-			      $args{'Rightname'} . "-" .
+			      $args{'right_name'} . "-" .
 			      $args{'principal_id'} . "-" .
 			      $args{'principal_type'}
                             } == 1) {

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/AttachmentCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/AttachmentCollection.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/AttachmentCollection.pm	Thu Dec 20 13:21:19 2007
@@ -187,7 +187,7 @@
     $self->limit(
         entry_aggregator => 'AND',
         alias           => $transactions,
-        column           => 'ObjectType',
+        column           => 'object_type',
         value           => 'RT::Model::Ticket',
     );
 

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Attribute.pm	Thu Dec 20 13:21:19 2007
@@ -61,7 +61,7 @@
 use Jifty::DBI::Record schema {
 column        object_id => max_length is 11,  type is 'int(11)', default is '0';
 column        name => max_length is 200,  type is 'varchar(200)', default is '';
-column        ObjectType => max_length is 200,  type is 'varchar(200)', default is '';
+column        object_type => max_length is 200,  type is 'varchar(200)', default is '';
 column        Description => max_length is 255,  type is 'varchar(255)', default is '';
 column        ContentType => max_length is 255,  type is 'varchar(255)', default is '';
 column        Content =>   type is 'blob', default is '';
@@ -99,7 +99,7 @@
 
 };
 
-=head2 LookupObjectRight { ObjectType => undef, object_id => undef, name => undef, Right => { create, update, delete, display } }
+=head2 LookupObjectRight { object_type => undef, object_id => undef, name => undef, Right => { create, update, delete, display } }
 
 Returns the right that the user needs to have on this attribute's object to perform the related attribute operation. Returns "allow" if the right is otherwise unspecified.
 
@@ -107,14 +107,14 @@
 
 sub LookupObjectRight { 
     my $self = shift;
-    my %args = ( ObjectType => undef,
+    my %args = ( object_type => undef,
                  object_id => undef,
                  Right => undef,
                  name => undef,
                  @_);
 
     # if it's an attribute on oneself, check the personal acl map
-    if (($args{'ObjectType'} eq 'RT::Model::User') && ($args{'object_id'} eq $self->current_user->id)) {
+    if (($args{'object_type'} eq 'RT::Model::User') && ($args{'object_id'} eq $self->current_user->id)) {
     return('allow') unless ($PERSONAL_ACL_MAP->{$args{'name'}});
     return('allow') unless ($PERSONAL_ACL_MAP->{$args{'name'}}->{$args{'Right'}});
     return($PERSONAL_ACL_MAP->{$args{'name'}}->{$args{'Right'}}); 
@@ -138,10 +138,10 @@
   varchar(200) 'name'.
   varchar(255) 'Content'.
   varchar(16) 'ContentType',
-  varchar(64) 'ObjectType'.
+  varchar(64) 'object_type'.
   int(11) 'object_id'.
 
-You may pass a C<Object> instead of C<ObjectType> and C<object_id>.
+You may pass a C<Object> instead of C<object_type> and C<object_id>.
 
 =cut
 
@@ -159,7 +159,7 @@
 		  @_);
 
     if ($args{Object} and UNIVERSAL::can($args{Object}, 'Id')) {
-	    $args{ObjectType} = ref($args{Object});
+	    $args{object_type} = ref($args{Object});
 	    $args{object_id} = $args{Object}->id;
     } else {
         return(0, $self->loc("Required parameter '[_1]' not specified", 'Object'));
@@ -171,7 +171,7 @@
     my $object_right = $self->LookupObjectRight(
         Right      => 'create',
         object_id   => $args{'object_id'},
-        ObjectType => $args{'ObjectType'},
+        object_type => $args{'object_type'},
         name       => $args{'name'}
     );
     if ($object_right eq 'deny') { 
@@ -201,7 +201,7 @@
                          Content => $args{'Content'},
                          ContentType => $args{'ContentType'},
                          Description => $args{'Description'},
-                         ObjectType => $args{'ObjectType'},
+                         object_type => $args{'object_type'},
                          object_id => $args{'object_id'},
 );
 
@@ -227,7 +227,7 @@
     return (
 	$self->load_by_cols(
 	    name => $args{'name'},
-	    ObjectType => ref($args{'Object'}),
+	    object_type => ref($args{'Object'}),
 	    object_id => $args{'Object'}->id,
 	)
     );
@@ -375,7 +375,7 @@
 
 sub Object {
     my $self = shift;
-    my $object_type = $self->__value('ObjectType');
+    my $object_type = $self->__value('object_type');
     my $object;
     eval { $object = $object_type->new };
     unless(UNIVERSAL::isa($object, $object_type)) {
@@ -435,7 +435,7 @@
     my $object_right = $self->LookupObjectRight(
         Right      => $right,
         object_id   => $self->__value('object_id'),
-        ObjectType => $self->__value('ObjectType'),
+        object_type => $self->__value('object_type'),
         name       => $self->__value('name')
     );
    

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/AttributeCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/AttributeCollection.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/AttributeCollection.pm	Thu Dec 20 13:21:19 2007
@@ -192,7 +192,7 @@
     unless (defined($obj) && ref($obj) && UNIVERSAL::can($obj, 'id') && $obj->id) {
     return undef;
     }
-    $self->limit(column => 'ObjectType', operator=> '=', value => ref($obj), entry_aggregator => 'OR');
+    $self->limit(column => 'object_type', operator=> '=', value => ref($obj), entry_aggregator => 'OR');
     $self->limit(column => 'object_id', operator=> '=', value => $obj->id, entry_aggregator => 'OR', quote_value => 0);
 
 }

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/CustomField.pm	Thu Dec 20 13:21:19 2007
@@ -123,11 +123,11 @@
 
 our %FRIENDLY_OBJECT_TYPES =  ();
 
-RT::Model::CustomField->_ForObjectType( 'RT::Model::Queue-RT::Model::Ticket' => "Tickets", );    #loc
-RT::Model::CustomField->_ForObjectType(
+RT::Model::CustomField->_Forobject_type( 'RT::Model::Queue-RT::Model::Ticket' => "Tickets", );    #loc
+RT::Model::CustomField->_Forobject_type(
     'RT::Model::Queue-RT::Model::Ticket-RT::Model::Transaction' => "Ticket Transactions", );    #loc
-RT::Model::CustomField->_ForObjectType( 'RT::Model::User'  => "Users", );                           #loc
-RT::Model::CustomField->_ForObjectType( 'RT::Model::Group' => "Groups", );                          #loc
+RT::Model::CustomField->_Forobject_type( 'RT::Model::User'  => "Users", );                           #loc
+RT::Model::CustomField->_Forobject_type( 'RT::Model::Group' => "Groups", );                          #loc
 
 our $RIGHTS = {
     SeeCustomField            => 'See custom fields',       # loc_pair
@@ -805,7 +805,7 @@
     return keys %FRIENDLY_OBJECT_TYPES;
 }
 
-my @FriendlyObjectTypes = (
+my @Friendlyobject_types = (
     "[_1] objects",            # loc
     "[_1]'s [_2] objects",        # loc
     "[_1]'s [_2]'s [_3] objects",   # loc
@@ -826,7 +826,7 @@
       grep { defined and length }
       split( /-/, $lookup )
       or return;
-    return ( $self->loc( $FriendlyObjectTypes[$#types], @types ) );
+    return ( $self->loc( $Friendlyobject_types[$#types], @types ) );
 }
 
 
@@ -961,7 +961,7 @@
     }
     my $newval = RT::Model::ObjectCustomFieldValue->new;
     my $val    = $newval->create(
-        ObjectType   => ref($obj),
+        object_type   => ref($obj),
         object_id     => $obj->id,
         Content      => $args{'Content'},
         LargeContent => $args{'LargeContent'},
@@ -1106,7 +1106,7 @@
 }
 
 
-=head2 _ForObjectType PATH friendly_name
+=head2 _Forobject_type PATH friendly_name
 
 Tell RT that a certain object accepts custom fields
 
@@ -1121,7 +1121,7 @@
 
 =cut
 
-sub _ForObjectType {
+sub _Forobject_type {
     my $self = shift;
     my $path = shift;
     my $friendly_name = shift;

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValue.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValue.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValue.pm	Thu Dec 20 13:21:19 2007
@@ -69,7 +69,7 @@
     column Content =>  type is 'varchar(255)', max_length is 255, default is '';
     column ContentEncoding =>  type is 'varchar(80)', max_length is 80, default is '';
     column LastUpdated =>  type is 'datetime',  default is '';
-    column ObjectType =>  type is 'varchar(255)', max_length is 255, default is '';
+    column object_type =>  type is 'varchar(255)', max_length is 255, default is '';
 
 };
 
@@ -87,7 +87,7 @@
     my $self = shift;
     my %args = (
         CustomField     => 0,
-        ObjectType      => '',
+        object_type      => '',
         object_id        => 0,
         disabled        => 0,
         Content         => '',
@@ -114,7 +114,7 @@
 
     return $self->SUPER::create(
         CustomField     => $args{'CustomField'},
-        ObjectType      => $args{'ObjectType'},
+        object_type      => $args{'object_type'},
         object_id        => $args{'object_id'},
         disabled        => $args{'disabled'},
         Content         => $args{'Content'},
@@ -153,7 +153,7 @@
     return $self->load_by_cols(
         Content => $args{'Content'},
         CustomField => $args{'CustomField'},
-        ObjectType => 'RT::Model::Ticket',
+        object_type => 'RT::Model::Ticket',
         object_id => $args{'Ticket'},
         disabled => 0
     );
@@ -173,7 +173,7 @@
     return $self->load_by_cols(
         Content => $args{'Content'},
         CustomField => $args{'CustomField'},
-        ObjectType => ref($obj),
+        object_type => ref($obj),
         object_id => $obj->id,
         disabled => 0
     );
@@ -205,7 +205,7 @@
 
 sub Object {
     my $self  = shift;
-    my $Object = $self->__value('ObjectType')->new;
+    my $Object = $self->__value('object_type')->new;
     $Object->load_by_id( $self->__value('object_id') );
     return $Object;
 }

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValueCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValueCollection.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/ObjectCustomFieldValueCollection.pm	Thu Dec 20 13:21:19 2007
@@ -84,7 +84,7 @@
     my $self = shift;
     my $object = shift;
     $self->limit(
-        column => 'ObjectType',
+        column => 'object_type',
         value => ref($object),
     );
     return $self->limit(

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Principal.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Principal.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Principal.pm	Thu Dec 20 13:21:19 2007
@@ -181,7 +181,7 @@
 
     # If it's a user, we really want to grant the right to their 
     # user equivalence group
-        return ( $ace->create(Rightname => $args{'Right'},
+        return ( $ace->create(right_name => $args{'Right'},
                           Object => $args{'Object'},
                           principal_type =>  $type,
                           principal_id => $self->id
@@ -191,7 +191,7 @@
 
 # {{{ RevokeRight
 
-=head2 RevokeRight { Right => "Rightname", Object => "object" }
+=head2 RevokeRight { Right => "right_name", Object => "object" }
 
 Delete a right that a user has 
 
@@ -212,7 +212,7 @@
     );
 
     #if we haven't specified any sort of right, we're talking about a global right
-    if (!defined $args{'Object'} && !defined $args{'object_id'} && !defined $args{'ObjectType'}) {
+    if (!defined $args{'Object'} && !defined $args{'object_id'} && !defined $args{'object_type'}) {
         $args{'Object'} = RT->system;
     }
     #ACL check handled in ACE.pm
@@ -220,7 +220,7 @@
 
     my $ace = RT::Model::ACE->new;
     $ace->load_by_values(
-        Rightname     => $args{'Right'},
+        right_name     => $args{'Right'},
         Object    => $args{'Object'},
         principal_type => $type,
         principal_id   => $self->id
@@ -424,7 +424,7 @@
             $role_clause   .= " AND Groups.Instance = '$id'" if $id;
             push @role_clauses, "($role_clause)";
 
-            my $object_clause = "ACL.ObjectType = '$type'";
+            my $object_clause = "ACL.object_type = '$type'";
             $object_clause   .= " AND ACL.object_id = $id" if $id;
             push @object_clauses, "($object_clause)";
         }
@@ -437,7 +437,7 @@
       "SELECT ACL.id from ACL, Groups, Principals, CachedGroupMembers WHERE  " .
 
       # Only find superuser or rights with the name $right
-      "(ACL.Rightname = 'SuperUser' OR  ACL.Rightname = '$right') "
+      "(ACL.right_name = 'SuperUser' OR  ACL.right_name = '$right') "
 
       # Never find disabled groups.
       . "AND ( Principals.disabled = 0 OR Principals.disabled IS NULL) " 

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Queue.pm	Thu Dec 20 13:21:19 2007
@@ -454,7 +454,7 @@
     my $self = shift;
     my $name = shift;
 
-    my $tempqueue = new RT::Model::Queue(RT->system_user);
+    my $tempqueue = RT::Model::Queue->new( current_user => RT->system_user);
     $tempqueue->load($name);
 
     #If this queue exists, return undef

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Template.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Template.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Template.pm	Thu Dec 20 13:21:19 2007
@@ -177,7 +177,7 @@
         $args{'Queue'} = 0;
     }
     else {
-        my $QueueObj = new RT::Model::Queue( $self->current_user );
+        my $QueueObj =  RT::Model::Queue->new( current_user => $self->current_user );
         $QueueObj->load( $args{'Queue'} ) || return ( undef, $self->loc('Invalid queue') );
     
         unless ( $QueueObj->current_user_has_right('ModifyTemplate') ) {

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/TicketCollection.pm	Thu Dec 20 13:21:19 2007
@@ -604,7 +604,7 @@
         );
         $sb->SUPER::limit(
             alias           => $sb->{_sql_transalias},
-            column           => 'ObjectType',
+            column           => 'object_type',
             value           => 'RT::Model::Ticket',
             entry_aggregator => 'AND',
         );
@@ -716,7 +716,7 @@
         );
         $self->SUPER::limit(
             alias           => $self->{_sql_transalias},
-            column           => 'ObjectType',
+            column           => 'object_type',
             value           => 'RT::Model::Ticket',
             entry_aggregator => 'AND',
         );
@@ -1274,7 +1274,7 @@
     }
     $self->SUPER::limit(
         leftjoin        => $TicketCFs,
-        column           => 'ObjectType',
+        column           => 'object_type',
         value           => 'RT::Model::Ticket',
         entry_aggregator => 'AND'
     );

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/Transaction.pm	Thu Dec 20 13:21:19 2007
@@ -23,7 +23,7 @@
 use Jifty::DBI::Schema;
 use Jifty::DBI::Record schema {
 
-    column ObjectType => max_length is 64, type is 'varchar(64)', default is '';
+    column object_type => max_length is 64, type is 'varchar(64)', default is '';
     column object_id   => max_length is 11, type is 'int(11)',     default is '0';
     column TimeTaken  => max_length is 11, type is 'int(11)',     default is '0';
     column Type       => max_length is 20, type is 'varchar(20)', default is '';
@@ -43,19 +43,19 @@
 
 
 
-=head2 ObjectType
+=head2 object_type
 
-Returns the current value of ObjectType. 
-(In the database, ObjectType is stored as varchar(64).)
+Returns the current value of object_type. 
+(In the database, object_type is stored as varchar(64).)
 
 
 
-=head2 SetObjectType value
+=head2 Setobject_type value
 
 
-Set ObjectType to value. 
+Set object_type to value. 
 Returns (1, 'Status message') on success and (0, 'Error Message') on failure.
-(In the database, ObjectType will be stored as a varchar(64).)
+(In the database, object_type will be stored as a varchar(64).)
 
 
 =cut
@@ -302,7 +302,7 @@
         MIMEObj        => undef,
         ActivateScrips => 1,
         CommitScrips => 1,
-	ObjectType => 'RT::Model::Ticket',
+	object_type => 'RT::Model::Ticket',
 	object_id => 0,
 	ReferenceType => undef,
         OldReference       => undef,
@@ -314,7 +314,7 @@
     $args{object_id} ||= $args{Ticket};
 
     #if we didn't specify a ticket, we need to bail
-    unless ( $args{'object_id'} && $args{'ObjectType'}) {
+    unless ( $args{'object_id'} && $args{'object_type'}) {
         return ( 0, $self->loc( "Transaction->create couldn't, as you didn't specify an object type and id"));
     }
 
@@ -328,7 +328,7 @@
         OldValue  => $args{'OldValue'},
         NewValue  => $args{'NewValue'},
         Created   => $args{'Created'},
-	ObjectType => $args{'ObjectType'},
+	object_type => $args{'object_type'},
 	object_id => $args{'object_id'},
 	ReferenceType => $args{'ReferenceType'},
 	OldReference => $args{'OldReference'},
@@ -353,7 +353,7 @@
 
     #Provide a way to turn off scrips if we need to
         $RT::Logger->debug('About to think about scrips for transaction #' .$self->id);
-    if ( $args{'ActivateScrips'} and $args{'ObjectType'} eq 'RT::Model::Ticket' ) {
+    if ( $args{'ActivateScrips'} and $args{'object_type'} eq 'RT::Model::Ticket' ) {
        $self->{'scrips'} = RT::Model::ScripCollection->new(current_user => RT->system_user);
 
         $RT::Logger->debug('About to prepare scrips for transaction #' .$self->id); 
@@ -727,7 +727,7 @@
         return $self->loc("No transaction type specified");
     }
 
-    my $obj_type = $self->FriendlyObjectType;
+    my $obj_type = $self->Friendlyobject_type;
 
     if ( $type eq 'Create' ) {
         return ( $self->loc( "[_1] Created", $obj_type ) );
@@ -1004,7 +1004,7 @@
 
 sub IsInbound {
     my $self = shift;
-    $self->ObjectType eq 'RT::Model::Ticket' or return undef;
+    $self->object_type eq 'RT::Model::Ticket' or return undef;
     return ( $self->TicketObj->IsRequestor( $self->CreatorObj->principal_id ) );
 }
 
@@ -1036,7 +1036,7 @@
     my $field = shift;
 
     #if the field is public, return it.
-    if ( $field eq 'ObjectType') {
+    if ( $field eq 'object_type') {
         return $self->SUPER::_value( $field );
     }
 
@@ -1105,7 +1105,7 @@
         return 0 unless $cf->current_user_has_right('SeeCustomField');
     }
     #if they ain't got rights to see, don't let em
-    elsif ( $self->__value('ObjectType') eq "RT::Model::Ticket" ) {
+    elsif ( $self->__value('object_type') eq "RT::Model::Ticket" ) {
         unless ( $self->current_user_has_right('ShowTicket') ) {
             return 0;
         }
@@ -1156,14 +1156,14 @@
 
 sub Object {
     my $self  = shift;
-    my $Object = $self->__value('ObjectType')->new;
+    my $Object = $self->__value('object_type')->new;
     $Object->load($self->__value('object_id'));
     return $Object;
 }
 
-sub FriendlyObjectType {
+sub Friendlyobject_type {
     my $self = shift;
-    my $type = $self->ObjectType or return undef;
+    my $type = $self->object_type or return undef;
     $type =~ s/^RT::Model:://;
     return $self->loc($type);
 }

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/TransactionCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/TransactionCollection.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/TransactionCollection.pm	Thu Dec 20 13:21:19 2007
@@ -111,7 +111,7 @@
             column2 => 'id'
         );
         $self->limit(
-            column => 'ObjectType',
+            column => 'object_type',
             value => 'RT::Model::Ticket',
         );
     }

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/User.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/User.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/User.pm	Thu Dec 20 13:21:19 2007
@@ -35,7 +35,6 @@
 
 use Jifty::DBI::Record schema {
     column        name  => max_length is 200,      type is 'varchar(200)', default is '';
-    column        password  => max_length is 40,      type is 'varchar(40)', default is '';
     column        comments  =>        type is 'blob', default is '';
     column        Signature  =>       type is 'blob', default is '';
     column        email  => max_length is 120,      type is 'varchar(120)', default is '';
@@ -116,10 +115,6 @@
     delete $args{'privileged'};
 
 
-    if ($args{'Cryptedpassword'} ) {
-        $args{'password'} = $args{'Cryptedpassword'};
-        delete $args{'Cryptedpassword'};
-    }
     elsif ( !$args{'password'} ) {
         $args{'password'} = '*NO-PASSWORD*';
     }
@@ -127,12 +122,6 @@
         return ( 0, $self->loc("password needs to be at least [_1] characters long",RT->Config->Get('MinimumpasswordLength')) );
     }
 
-    else {
-        $args{'password'} = $self->_Generatepassword($args{'password'});
-    }
-
-    #TODO Specify some sensible defaults.
-
     unless ( $args{'name'} ) {
         return ( 0, $self->loc("Must specify 'name' attribute") );
     }
@@ -639,8 +628,7 @@
 
     my $min = ( RT->Config->Get('MinimumpasswordLength') > 6 ?  RT->Config->Get('MinimumpasswordLength') : 6);
     my $max = ( RT->Config->Get('MinimumpasswordLength') > 8 ?  RT->Config->Get('MinimumpasswordLength') : 8);
-
-    my $pass = $self->GenerateRandompassword( $min, $max) ;
+    my $pass =    Text::Password::Pronounceable->generate($min => $max);
 
     # If we have "notify user on 
 
@@ -656,236 +644,6 @@
 
 # }}}
 
-# {{{ sub Resetpassword
-
-=head2 Resetpassword
-
-Returns status, [ERROR or new password].  Resets this user\'s password to
-a randomly generated pronouncable password and emails them, using a 
-global template called "RT_passwordChange", which can be overridden
-with global templates "RT_passwordChange_privileged" or "RT_passwordChange_Nonprivileged" 
-for privileged and Non-privileged users respectively.
-
-=cut
-
-sub Resetpassword {
-    my $self = shift;
-
-    unless ( $self->current_user_can_modify('password') ) {
-        return ( 0, $self->loc("Permission Denied") );
-    }
-    my ( $status, $pass ) = $self->set_Randompassword();
-
-    unless ($status) {
-        return ( 0, "$pass" );
-    }
-
-    my $ret = RT::Interface::Email::SendEmailUsingTemplate(
-        To        => $self->email,
-        Template  => 'passwordChange',
-        Arguments => {
-            Newpassword => $pass,
-        },
-        );
-
-    if ($ret) {
-        return ( 1, $self->loc('New password notification sent') );
-    }
-    else {
-        return ( 0, $self->loc('Notification could not be sent') );
-    }
-
-}
-
-# }}}
-
-# {{{ sub GenerateRandompassword
-
-=head2 GenerateRandompassword MIN_LEN and MAX_LEN
-
-Returns a random password between MIN_LEN and MAX_LEN characters long.
-
-=cut
-
-sub GenerateRandompassword {
-    my $self       = shift;
-    my $min_length = shift;
-    my $max_length = shift;
-
-    #This code derived from mpw.pl, a bit of code with a sordid history
-    # Its notes: 
-
-    # Perl cleaned up a bit by Jesse Vincent 1/14/2001.
-    # Converted to perl from C by Marc Horowitz, 1/20/2000.
-    # Converted to C from Multics PL/I by Bill Sommerfeld, 4/21/86.
-    # Original PL/I version provided by Jerry Saltzer.
-
-    my ( $frequency, $start_freq, $total_sum, $row_sums );
-
-    #When munging characters, we need to know where to start counting letters from
-    my $a = ord('a');
-
-    # frequency of English digraphs (from D Edwards 1/27/66) 
-    $frequency = [
-        [
-            4, 20, 28, 52, 2,  11,  28, 4,  32, 4, 6, 62, 23, 167,
-            2, 14, 0,  83, 76, 127, 7,  25, 8,  1, 9, 1
-        ],    # aa - az
-        [
-            13, 0, 0, 0,  55, 0, 0,  0, 8, 2, 0,  22, 0, 0,
-            11, 0, 0, 15, 4,  2, 13, 0, 0, 0, 15, 0
-        ],    # ba - bz
-        [
-            32, 0, 7, 1,  69, 0,  0,  33, 17, 0, 10, 9, 1, 0,
-            50, 3, 0, 10, 0,  28, 11, 0,  0,  0, 3,  0
-        ],    # ca - cz
-        [
-            40, 16, 9, 5,  65, 18, 3,  9, 56, 0, 1, 4, 15, 6,
-            16, 4,  0, 21, 18, 53, 19, 5, 15, 0, 3, 0
-        ],    # da - dz
-        [
-            84, 20, 55, 125, 51, 40, 19, 16,  50,  1,
-            4,  55, 54, 146, 35, 37, 6,  191, 149, 65,
-            9,  26, 21, 12,  5,  0
-        ],    # ea - ez
-        [
-            19, 3, 5, 1,  19, 21, 1, 3, 30, 2, 0, 11, 1, 0,
-            51, 0, 0, 26, 8,  47, 6, 3, 3,  0, 2, 0
-        ],    # fa - fz
-        [
-            20, 4, 3, 2,  35, 1,  3, 15, 18, 0, 0, 5, 1, 4,
-            21, 1, 1, 20, 9,  21, 9, 0,  5,  0, 1, 0
-        ],    # ga - gz
-        [
-            101, 1, 3, 0, 270, 5,  1, 6, 57, 0, 0, 0, 3, 2,
-            44,  1, 0, 3, 10,  18, 6, 0, 5,  0, 3, 0
-        ],    # ha - hz
-        [
-            40, 7,  51, 23, 25, 9,   11, 3,  0, 0, 2, 38, 25, 202,
-            56, 12, 1,  46, 79, 117, 1,  22, 0, 4, 0, 3
-        ],    # ia - iz
-        [
-            3, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0,
-            4, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0
-        ],    # ja - jz
-        [
-            1, 0, 0, 0, 11, 0, 0, 0, 13, 0, 0, 0, 0, 2,
-            0, 0, 0, 0, 6,  2, 1, 0, 2,  0, 1, 0
-        ],    # ka - kz
-        [
-            44, 2, 5, 12, 62, 7,  5, 2, 42, 1, 1,  53, 2, 2,
-            25, 1, 1, 2,  16, 23, 9, 0, 1,  0, 33, 0
-        ],    # la - lz
-        [
-            52, 14, 1, 0, 64, 0, 0, 3, 37, 0, 0, 0, 7, 1,
-            17, 18, 1, 2, 12, 3, 8, 0, 1,  0, 2, 0
-        ],    # ma - mz
-        [
-            42, 10, 47, 122, 63, 19, 106, 12, 30, 1,
-            6,  6,  9,  7,   54, 7,  1,   7,  44, 124,
-            6,  1,  15, 0,   12, 0
-        ],    # na - nz
-        [
-            7,  12, 14, 17, 5,  95, 3,  5,  14, 0, 0, 19, 41, 134,
-            13, 23, 0,  91, 23, 42, 55, 16, 28, 0, 4, 1
-        ],    # oa - oz
-        [
-            19, 1, 0, 0,  37, 0, 0, 4, 8, 0, 0, 15, 1, 0,
-            27, 9, 0, 33, 14, 7, 6, 0, 0, 0, 0, 0
-        ],    # pa - pz
-        [
-            0, 0, 0, 0, 0, 0, 0,  0, 0, 0, 0, 0, 0, 0,
-            0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0
-        ],    # qa - qz
-        [
-            83, 8, 16, 23, 169, 4,  8, 8,  77, 1, 10, 5, 26, 16,
-            60, 4, 0,  24, 37,  55, 6, 11, 4,  0, 28, 0
-        ],    # ra - rz
-        [
-            65, 9,  17, 9, 73, 13,  1,  47, 75, 3, 0, 7, 11, 12,
-            56, 17, 6,  9, 48, 116, 35, 1,  28, 0, 4, 0
-        ],    # sa - sz
-        [
-            57, 22, 3,  1, 76, 5, 2, 330, 126, 1,
-            0,  14, 10, 6, 79, 7, 0, 49,  50,  56,
-            21, 2,  27, 0, 24, 0
-        ],    # ta - tz
-        [
-            11, 5,  9, 6,  9,  1,  6, 0, 9, 0, 1, 19, 5, 31,
-            1,  15, 0, 47, 39, 31, 0, 3, 0, 0, 0, 0
-        ],    # ua - uz
-        [
-            7, 0, 0, 0, 72, 0, 0, 0, 28, 0, 0, 0, 0, 0,
-            5, 0, 0, 0, 0,  0, 0, 0, 0,  0, 3, 0
-        ],    # va - vz
-        [
-            36, 1, 1, 0, 38, 0, 0, 33, 36, 0, 0, 4, 1, 8,
-            15, 0, 0, 0, 4,  2, 0, 0,  1,  0, 0, 0
-        ],    # wa - wz
-        [
-            1, 0, 2, 0, 0, 1, 0, 0, 3, 0, 0, 0, 0, 0,
-            1, 5, 0, 0, 0, 3, 0, 0, 1, 0, 0, 0
-        ],    # xa - xz
-        [
-            14, 5, 4, 2, 7,  12, 12, 6, 10, 0, 0, 3, 7, 5,
-            17, 3, 0, 4, 16, 30, 0,  0, 5,  0, 0, 0
-        ],    # ya - yz
-        [
-            1, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-        ]
-    ];    # za - zz
-
-    #We need to know the totals for each row 
-    $row_sums = [
-        map {
-            my $sum = 0;
-            map { $sum += $_ } @$_;
-            $sum;
-          } @$frequency
-    ];
-
-    #Frequency with which a given letter starts a word.
-    $start_freq = [
-        1299, 425, 725, 271, 375, 470, 93, 223, 1009, 24,
-        20,   355, 379, 319, 823, 618, 21, 317, 962,  1991,
-        271,  104, 516, 6,   16,  14
-    ];
-
-    $total_sum = 0;
-    map { $total_sum += $_ } @$start_freq;
-
-    my $length = $min_length + int( rand( $max_length - $min_length ) );
-
-    my $char = $self->_GenerateRandomNextChar( $total_sum, $start_freq );
-    my @word = ( $char + $a );
-    for ( 2 .. $length ) {
-        $char =
-          $self->_GenerateRandomNextChar( $row_sums->[$char],
-            $frequency->[$char] );
-        push ( @word, $char + $a );
-    }
-
-    #Return the password
-    return pack( "C*", @word );
-
-}
-
-#A private helper function for Randompassword
-# Takes a row summary and a frequency chart for the next character to be searched
-sub _GenerateRandomNextChar {
-    my $self = shift;
-    my ( $all, $freq ) = @_;
-    my ( $pos, $i );
-
-    for ( $pos = int( rand($all) ), $i = 0 ;
-        $pos >= $freq->[$i] ;
-        $pos -= $freq->[$i], $i++ )
-    {
-    }
-
-    return ($i);
-}
 
 # }}}
 
@@ -914,7 +672,6 @@
     }
     else {
         my $new = !$self->has_password;
-        $password = $self->_Generatepassword($password);
         my ( $val, $msg ) = $self->_set(column => 'password', value=> $password);
         if ($val) {
             return ( 1, $self->loc("password set") ) if $new;
@@ -927,38 +684,6 @@
 
 }
 
-=head2 _Generatepassword PASSWORD
-
-returns an MD5 hash of the password passed in, in hexadecimal encoding.
-
-=cut
-
-sub _Generatepassword {
-    my $self = shift;
-    my $password = shift;
-
-    my $md5 = Digest::MD5->new();
-    $md5->add(encode_utf8($password));
-    return ($md5->hexdigest);
-
-}
-
-=head2 _GeneratepasswordBase64 PASSWORD
-
-returns an MD5 hash of the password passed in, in base64 encoding
-(obsoleted now).
-
-=cut
-
-sub _GeneratepasswordBase64 {
-    my $self = shift;
-    my $password = shift;
-
-    my $md5 = Digest::MD5->new();
-    $md5->add(encode_utf8($password));
-    return ($md5->b64digest);
-
-}
 
 # }}}
 
@@ -980,55 +705,6 @@
 }
 
 
-# {{{ sub Ispassword 
-
-=head2 Ispassword
-
-Returns true if the passed in value is this user's password.
-Returns undef otherwise.
-
-=cut
-
-sub Ispassword {
-    my $self  = shift;
-    my $value = shift;
-
-    #TODO there isn't any apparent way to legitimately ACL this
-
-    # RT does not allow null passwords 
-    if ( ( !defined($value) ) or ( $value eq '' ) ) {
-        return (undef);
-    }
-
-   if ( $self->principal_object->disabled ) {
-        $RT::Logger->info(
-            "disabled user " . $self->name . " tried to log in" );
-        return (undef);
-    }
-
-    unless ($self->has_password) {
-        return(undef);
-     }
-
-    # generate an md5 password 
-    if ($self->_Generatepassword($value) eq $self->__value('password')) {
-        return(1);
-    }
-
-    #  if it's a historical password we say ok.
-    if ($self->__value('password') eq crypt($value, $self->__value('password'))
-        or $self->_GeneratepasswordBase64($value) eq $self->__value('password'))
-    {
-        # ...but upgrade the legacy password inplace.
-        $self->set(column => password, value => $self->_Generatepassword($value) );
-        return(1);
-    }
-
-    # no password check has succeeded. get out
-
-    return (undef);
-}
-
 # }}}
 
 # }}}
@@ -1203,8 +879,6 @@
 
 sub has_right {
     my $self = shift;
-    warn "skipping acl check";
-    return 1;
     return  $self->principal_object->has_right(@_);
 
 }
@@ -1450,7 +1124,7 @@
     $deleg_acl->LimitToPrincipal(Type => 'User',
                  Id => $self->principal_id,
                  IncludeGroupMembership => 1);
-    $deleg_acl->limit( column => 'Rightname',
+    $deleg_acl->limit( column => 'right_name',
                operator => '=',
                value => 'DelegateRights' );
     my @allowed_deleg_objects = map {$_->Object()}
@@ -1566,7 +1240,7 @@
     }
 
     #If the user has the admin users right, return the field
-    elsif ($self->current_user &&  $self->current_user->has_right(Right =>'AdminUsers', Object => RT->system) ) {
+    elsif ($self->current_user->user_object &&  $self->current_user->user_object->has_right(Right =>'AdminUsers', Object => RT->system) ) {
         return ( $self->SUPER::_value($field) );
     }
     else {

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Model/UserCollection.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Model/UserCollection.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Model/UserCollection.pm	Thu Dec 20 13:21:19 2007
@@ -295,7 +295,7 @@
     my $acl = $self->new_alias('ACL');
     $self->limit(
         alias    => $acl,
-        column    => 'Rightname',
+        column    => 'right_name',
         operator => ( $args{Right} ? '=' : 'IS NOT' ),
         value => $args{Right} || 'NULL',
         entry_aggregator => 'OR'
@@ -303,7 +303,7 @@
     if ( $args{'IncludeSuperusers'} and $args{'Right'} ) {
         $self->limit(
             alias           => $acl,
-            column           => 'Rightname',
+            column           => 'right_name',
             operator        => '=',
             value           => 'SuperUser',
             entry_aggregator => 'OR'
@@ -358,8 +358,8 @@
         @_
     );
 
-    if ( defined $args{'ObjectType'} || defined $args{'object_id'} ) {
-        $RT::Logger->crit( "WhoHaveRight called with the Obsolete object_id/ObjectType API");
+    if ( defined $args{'object_type'} || defined $args{'object_id'} ) {
+        $RT::Logger->crit( "WhoHaveRight called with the Obsolete object_id/object_type API");
         return (undef);
     }
 
@@ -416,7 +416,7 @@
             $role_clause   .= " AND $groups.Instance = '$id'" if $id;
             push @role_clauses, "($role_clause)";
 
-            my $object_clause = "$acl.ObjectType = '$type'";
+            my $object_clause = "$acl.object_type = '$type'";
             $object_clause   .= " AND $acl.object_id = $id" if $id;
             push @object_clauses, "($object_clause)";
         }
@@ -425,7 +425,7 @@
         $check_objects = join ' OR ', @object_clauses;
     } else {
         if( !$args{'IncludeSystemRights'} ) {
-            $check_objects = "($acl.ObjectType != 'RT::System')";
+            $check_objects = "($acl.object_type != 'RT::System')";
         }
     }
 
@@ -488,7 +488,7 @@
             my $id;
             $id = $obj->id if ref($obj) && UNIVERSAL::can($obj, 'id') && $obj->id;
 
-            my $object_clause = "$acl.ObjectType = '$type'";
+            my $object_clause = "$acl.object_type = '$type'";
             $object_clause   .= " AND $acl.object_id   = $id" if $id;
             push @object_clauses, "($object_clause)";
         }
@@ -496,7 +496,7 @@
         $check_objects = join ' OR ', @object_clauses;
     } else {
         if( !$args{'IncludeSystemRights'} ) {
-            $check_objects = "($acl.ObjectType != 'RT::System')";
+            $check_objects = "($acl.object_type != 'RT::System')";
         }
     }
     $self->_add_subclause( "WhichObject", "($check_objects)" );

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Record.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Record.pm	Thu Dec 20 13:21:19 2007
@@ -84,6 +84,9 @@
 return $class;
 }
 
+
+sub current_user_can { 1} # For now, we're using RT's auth, not jifty's
+
 sub __set {
     my $self = shift;
     my %args = (@_);
@@ -117,7 +120,7 @@
     } 
 }
 
-=head2 ObjectTypeStr
+=head2 object_typeStr
 
 Returns a string which is this object's type.  The type is the class,
 without the "RT::" prefix.
@@ -125,7 +128,7 @@
 
 =cut
 
-sub ObjectTypeStr {
+sub object_typeStr {
     my $self = shift;
     if (ref($self) =~ /^.*::(\w+)$/) {
 	return $self->loc($1);
@@ -253,8 +256,6 @@
 sub create {
     my $self    = shift;
     my %attribs = (@_);
-    if (ref($self) eq 'RT::Model::Queue') {
-    }
     foreach my $key ( keys %attribs ) {
         my $method = $self->can("validate_$key");
         if ($method) { 
@@ -275,7 +276,7 @@
     my $now = RT::Date->new( current_user =>  $self->current_user );
     $now->set( Format => 'unix', value => time );
 
-    my $id = $self->SUPER::create(%attribs);
+    my ($id) = $self->SUPER::create(%attribs);
     if ( UNIVERSAL::isa( $id, 'Class::ReturnValue' ) ) {
         if ( $id->errno ) {
             if (wantarray) {
@@ -511,7 +512,6 @@
 
 sub _setLastUpdated {
     my $self = shift;
-    use RT::Date;
     my $now = new RT::Date( current_user => $self->current_user );
     $now->set_to_now();
 
@@ -1250,7 +1250,7 @@
     my $trans = RT::Model::Transaction->new();
     my ( $transaction, $msg ) = $trans->create(
 	object_id  => $self->id,
-	ObjectType => ref($self),
+	object_type => ref($self),
         TimeTaken => $args{'TimeTaken'},
         Type      => $args{'Type'},
         Data      => $args{'Data'},
@@ -1304,7 +1304,7 @@
         value => $self->id,
     );
     $transactions->limit(
-        column => 'ObjectType',
+        column => 'object_type',
         value => ref($self),
     );
 

Modified: rt/branches/3.999-DANGEROUS/lib/RT/SearchBuilder.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/SearchBuilder.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/SearchBuilder.pm	Thu Dec 20 13:21:19 2007
@@ -155,7 +155,7 @@
 
     $self->limit(
 	$clause	   => $alias,
-	column      => 'ObjectType',
+	column      => 'object_type',
 	operator   => '=',
 	value      => $type,
     );
@@ -239,7 +239,7 @@
     ) if ($args{'customfield'});
     $self->limit(
 	alias      => $alias,
-	column      => 'ObjectType',
+	column      => 'object_type',
 	operator   => '=',
 	value      => $self->_SingularClass,
     );

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Shredder/Plugin/Summary.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Shredder/Plugin/Summary.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Shredder/Plugin/Summary.pm	Thu Dec 20 13:21:19 2007
@@ -124,7 +124,7 @@
     my %args = ( Object => undef, @_ );
 
     my $props = $self->_MakeHash( $args{'Object'} );
-    $props->{'Object'} = delete $props->{'ObjectType'};
+    $props->{'Object'} = delete $props->{'object_type'};
     $props->{'Object'} .= '-'. delete $props->{'object_id'}
         if $props->{'object_id'};
     return 1 if $skip_refs_to{ $props->{'Object'} };

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Shredder/Record.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Shredder/Record.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Shredder/Record.pm	Thu Dec 20 13:21:19 2007
@@ -139,7 +139,7 @@
 
 # Transactions
     $objs = RT::Model::TransactionCollection->new;
-    $objs->limit( column => 'ObjectType', value => ref $self );
+    $objs->limit( column => 'object_type', value => ref $self );
     $objs->limit( column => 'object_id', value => $self->id );
     push( @$list, $objs );
 

Modified: rt/branches/3.999-DANGEROUS/lib/RT/Test.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/Test.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/Test.pm	Thu Dec 20 13:21:19 2007
@@ -186,7 +186,7 @@
 
     require RT::ACL;
     my $acl = RT::ACL->new(current_user => RT->system_user );
-    $acl->limit( column => 'Rightname', operator => '!=', value => 'SuperUser' );
+    $acl->limit( column => 'right_name', operator => '!=', value => 'SuperUser' );
 
     my @res;
     while ( my $ace = $acl->next ) {
@@ -222,7 +222,7 @@
 
     require RT::Model::ACECollection;
     my $acl = RT::Model::ACECollection->new(current_user => RT->system_user );
-    $acl->limit( column => 'Rightname', operator => '!=', value => 'SuperUser' );
+    $acl->limit( column => 'right_name', operator => '!=', value => 'SuperUser' );
     while ( my $ace = $acl->next ) {
         my $obj = $ace->principal_object->Object;
         if ( $obj->isa('RT::Model::Group') && $obj->Type eq 'UserEquiv' && $obj->Instance == $RT::Nobody->id ) {

Modified: rt/branches/3.999-DANGEROUS/lib/RT/URI/fsck_com_rt.pm
==============================================================================
--- rt/branches/3.999-DANGEROUS/lib/RT/URI/fsck_com_rt.pm	(original)
+++ rt/branches/3.999-DANGEROUS/lib/RT/URI/fsck_com_rt.pm	Thu Dec 20 13:21:19 2007
@@ -75,11 +75,11 @@
     return ($prefix);
 }
 
-=head2 ObjectType
+=head2 object_type
 
 =cut
 
-sub ObjectType {
+sub object_type {
     my $self = shift;
     my $object = shift || $self->Object;
 
@@ -104,7 +104,7 @@
 sub URIForObject {
     my $self = shift;
     my $obj = shift;
-    return ($self->LocalURIPrefix ."/". $self->ObjectType($obj) ."/". $obj->id);
+    return ($self->LocalURIPrefix ."/". $self->object_type($obj) ."/". $obj->id);
 }
 
 
@@ -212,7 +212,7 @@
 
 sub HREF {
     my $self = shift;
-    if ($self->IsLocal && $self->Object && ($self->ObjectType eq 'ticket')) {
+    if ($self->IsLocal && $self->Object && ($self->object_type eq 'ticket')) {
         return ( RT->Config->Get('WebURL') . "Ticket/Display.html?id=".$self->Object->id);
     }   
     else {
@@ -229,7 +229,7 @@
 sub AsString {
     my $self = shift;
     if ($self->IsLocal && $self->Object) {
-	    return $self->loc("[_1] #[_2]", $self->ObjectType, $self->Object->id);
+	    return $self->loc("[_1] #[_2]", $self->object_type, $self->Object->id);
     }
     else {
 	    return $self->URI;

Modified: rt/branches/3.999-DANGEROUS/t/api/ace.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/ace.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/ace.t	Thu Dec 20 13:21:19 2007
@@ -73,7 +73,7 @@
 my $user_b_equiv_group = RT::Model::Group->new($user_b);
 $user_b_equiv_group->load_acl_equivalence_group($user_b->principal_object);
 ok ($user_b_equiv_group->id, "Loaded the user B acl equivalence group");
-$own_ticket_ace->load_by_values( principal_type => 'Group', principal_id => $user_a_equiv_group->principal_id, Object=>$q, Rightname => 'OwnTicket');
+$own_ticket_ace->load_by_values( principal_type => 'Group', principal_id => $user_a_equiv_group->principal_id, Object=>$q, right_name => 'OwnTicket');
 
 ok ($own_ticket_ace->id, "Found the ACE we want to test with for now");
 
@@ -92,7 +92,7 @@
 ok( $val    ,"user a tries and succeeds to delegate the right 'ownticket' in queue 'DelegationTest' to personal group 'delegates' - $msg");
 ok(  $user_b->has_right(Right => 'OwnTicket', Object => $q)  ,"user b has the right to own tickets in queue 'DelegationTest'");
 my $delegated_ace = RT::Model::ACE->new($user_a);
-$delegated_ace->load_by_values ( Object => $q, Rightname => 'OwnTicket', principal_type => 'Group',
+$delegated_ace->load_by_values ( Object => $q, right_name => 'OwnTicket', principal_type => 'Group',
 principal_id => $a_delegates->principal_id, DelegatedBy => $user_a->principal_id, DelegatedFrom => $own_ticket_ace->id);
 ok ($delegated_ace->id, "Found the delegated ACE");
 
@@ -168,7 +168,7 @@
 ok(  $user_a->has_right(Right => 'OwnTicket', Object => $q)  ,"make sure that user a can own tickets in queue 'DelegationTest'");
 
 my $group_ace= RT::Model::ACE->new($user_a);
-$group_ace->load_by_values( principal_type => 'Group', principal_id => $del1->principal_id, Object => $q, Rightname => 'OwnTicket');
+$group_ace->load_by_values( principal_type => 'Group', principal_id => $del1->principal_id, Object => $q, right_name => 'OwnTicket');
 
 ok ($group_ace->id, "Found the ACE we want to test with for now");
 
@@ -199,7 +199,7 @@
 ok($val, "grant the right 'own tickets' in queue 'DelegationTest' to group del2 - $msg");
 
 my $del2_right = RT::Model::ACE->new($user_a);
-$del2_right->load_by_values( principal_id => $del2->principal_id, principal_type => 'Group', Object => $q, Rightname => 'OwnTicket');
+$del2_right->load_by_values( principal_id => $del2->principal_id, principal_type => 'Group', Object => $q, right_name => 'OwnTicket');
 ok ($del2_right->id, "Found the right");
 
 ($val, $msg) = $del2_right->Delegate(principal_id => $a_delegates->principal_id);
@@ -219,7 +219,7 @@
 
 
 $group_ace= RT::Model::ACE->new($user_a);
-$group_ace->load_by_values( principal_type => 'Group', principal_id => $del1->principal_id, Object=>$q, Rightname => 'OwnTicket');
+$group_ace->load_by_values( principal_type => 'Group', principal_id => $del1->principal_id, Object=>$q, right_name => 'OwnTicket');
 
 ok ($group_ace->id, "Found the ACE we want to test with for now");
 

Modified: rt/branches/3.999-DANGEROUS/t/api/cf_transaction.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/cf_transaction.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/cf_transaction.t	Thu Dec 20 13:21:19 2007
@@ -37,7 +37,7 @@
 $trans->load($transid);
 
 is($trans->object_id,$id);
-is ($trans->ObjectType, 'RT::Model::Ticket');
+is ($trans->object_type, 'RT::Model::Ticket');
 is ($trans->Type, 'Create');
 my $txncfs = $trans->CustomFields;
 is ($txncfs->count, 1, "We have one custom field");

Modified: rt/branches/3.999-DANGEROUS/t/api/groups.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/groups.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/groups.t	Thu Dec 20 13:21:19 2007
@@ -98,7 +98,7 @@
 *RTx::System::Id = sub { 1; };
 *RTx::System::id = *RTx::System::Id;
 my $ace = RT::Model::ACE->new(current_user => RT->system_user);
-($id, $msg) = $ace->RT::Record::create( principal_id => $RTxGroup->id, principal_type => 'Group', Rightname => 'RTxGroupRight', ObjectType => 'RTx::System', object_id  => 1);
+($id, $msg) = $ace->RT::Record::create( principal_id => $RTxGroup->id, principal_type => 'Group', right_name => 'RTxGroupRight', object_type => 'RTx::System', object_id  => 1);
 ok ($id, "ACL for RTxSysObj Created");
 
 my $RTxObj = {};
@@ -120,7 +120,7 @@
 
 use RT::Model::ACE;
 $ace = RT::Model::ACE->new(current_user => RT->system_user);
-($id, $msg) = $ace->RT::Record::create( principal_id => $RTxGroup->id, principal_type => 'Group', Rightname => 'RTxGroupRight', ObjectType => 'RTx::System::Record', object_id  => 5 );
+($id, $msg) = $ace->RT::Record::create( principal_id => $RTxGroup->id, principal_type => 'Group', right_name => 'RTxGroupRight', object_type => 'RTx::System::Record', object_id  => 5 );
 ok ($id, "ACL for RTxObj Created");
 
 my $RTxObj2 = {};

Modified: rt/branches/3.999-DANGEROUS/t/api/record.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/record.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/record.t	Thu Dec 20 13:21:19 2007
@@ -18,8 +18,8 @@
 
 my $ticket = RT::Model::Ticket->new(current_user => RT->system_user);
 my $group = RT::Model::Group->new(current_user => RT->system_user);
-is($ticket->ObjectTypeStr, 'Ticket', "Ticket returns correct typestring");
-is($group->ObjectTypeStr, 'Group', "Group returns correct typestring");
+is($ticket->object_typeStr, 'Ticket', "Ticket returns correct typestring");
+is($group->object_typeStr, 'Group', "Group returns correct typestring");
 
 
 }

Modified: rt/branches/3.999-DANGEROUS/t/api/rights.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/rights.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/rights.t	Thu Dec 20 13:21:19 2007
@@ -64,7 +64,7 @@
 
 # clear all global right
 my $acl = RT::Model::ACECollection->new(current_user => RT->system_user);
-$acl->limit( column => 'Rightname', operator => '!=', value => 'SuperUser' );
+$acl->limit( column => 'right_name', operator => '!=', value => 'SuperUser' );
 $acl->LimitToObject( RT->system );
 while( my $ace = $acl->next ) {
 	$ace->delete;

Modified: rt/branches/3.999-DANGEROUS/t/api/ticket.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/ticket.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/ticket.t	Thu Dec 20 13:21:19 2007
@@ -208,7 +208,7 @@
 my $txns = RT::Model::TransactionCollection->new(current_user => RT->system_user);
 $txns->order_by(column => 'id', order => 'DESC');
 $txns->limit(column => 'object_id', value => '1');
-$txns->limit(column => 'ObjectType', value => 'RT::Model::Ticket');
+$txns->limit(column => 'object_type', value => 'RT::Model::Ticket');
 $txns->limit(column => 'Type', operator => '!=',  value => 'EmailRecord');
 
 my $give  = $txns->first;

Modified: rt/branches/3.999-DANGEROUS/t/api/users.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/api/users.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/api/users.t	Thu Dec 20 13:21:19 2007
@@ -27,7 +27,7 @@
 *RTx::System::Id = sub { 1; };
 *RTx::System::id = *RTx::System::Id;
 my $ace = RT::Model::ACE->new(current_user => RT->system_user);
-($id, $msg) = $ace->RT::Record::create( principal_id => $group->id, principal_type => 'Group', Rightname => 'RTxUserRight', ObjectType => 'RTx::System', object_id  => 1 );
+($id, $msg) = $ace->RT::Record::create( principal_id => $group->id, principal_type => 'Group', right_name => 'RTxUserRight', object_type => 'RTx::System', object_id  => 1 );
 ok ($id, "ACL for RTxSysObj Created");
 
 my $RTxObj = {};
@@ -48,7 +48,7 @@
 is($users->count, 1, "RTxUserRight found for RTxObj using EquivObjects");
 
 $ace = RT::Model::ACE->new(current_user => RT->system_user);
-($id, $msg) = $ace->RT::Record::create( principal_id => $group->id, principal_type => 'Group', Rightname => 'RTxUserRight', ObjectType => 'RTx::System::Record', object_id => 5 );
+($id, $msg) = $ace->RT::Record::create( principal_id => $group->id, principal_type => 'Group', right_name => 'RTxUserRight', object_type => 'RTx::System::Record', object_id => 5 );
 ok ($id, "ACL for RTxObj Created");
 
 my $RTxObj2 = {};

Modified: rt/branches/3.999-DANGEROUS/t/delegation/cleanup_stalled.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/delegation/cleanup_stalled.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/delegation/cleanup_stalled.t	Thu Dec 20 13:21:19 2007
@@ -101,7 +101,7 @@
 
 $ace = RT::Model::ACE->new($u1);
 ( $ret, $msg ) = $ace->load_by_values(
-    Rightname     => 'ShowConfigTab',
+    right_name     => 'ShowConfigTab',
     Object        => RT->system,
     principal_type => 'Group',
     principal_id   => $g2->principal_id
@@ -176,7 +176,7 @@
     "Test personal group 1 lacks global DelegateRights after joining g1" );
 $ace = RT::Model::ACE->new($u1);
 ( $ret, $msg ) = $ace->load_by_values(
-    Rightname     => 'AdminGroup',
+    right_name     => 'AdminGroup',
     Object        => $pg1,
     principal_type => 'Group',
     principal_id   => $g2->principal_id
@@ -240,7 +240,7 @@
 ok( $ret, "Add test user 1 to g2: $msg" );
 $ace = RT::Model::ACE->new($u1);
 ( $ret, $msg ) = $ace->load_by_values(
-    Rightname     => 'AdminGroup',
+    right_name     => 'AdminGroup',
     Object        => $pg1,
     principal_type => 'Group',
     principal_id   => $g2->principal_id
@@ -313,7 +313,7 @@
 
 $ace = RT::Model::ACE->new($u1);
 ( $ret, $msg ) = $ace->load_by_values(
-    Rightname     => 'ShowConfigTab',
+    right_name     => 'ShowConfigTab',
     Object        => RT->system,
     principal_type => 'Group',
     principal_id   => $g2->principal_id
@@ -359,7 +359,7 @@
 ok( $ret, "Add test user 1 to g1: $msg" );
 $ace = RT::Model::ACE->new($u1);
 ( $ret, $msg ) = $ace->load_by_values(
-    Rightname     => 'DelegateRights',
+    right_name     => 'DelegateRights',
     Object        => RT->system,
     principal_type => 'Group',
     principal_id   => $g1->principal_id
@@ -374,7 +374,7 @@
 ok( $ret, "Add test user 2 to g2: $msg" );
 $ace = RT::Model::ACE->new($u2);
 ( $ret, $msg ) = $ace->load_by_values(
-    Rightname     => 'ShowConfigTab',
+    right_name     => 'ShowConfigTab',
     Object        => RT->system,
     principal_type => 'Group',
     principal_id   => $g2->principal_id
@@ -401,7 +401,7 @@
 ok( $ret, "Add u1 to g1: $msg" );
 $ace = RT::Model::ACE->new($u1);
 ( $ret, $msg ) = $ace->load_by_values(
-    Rightname     => 'DelegateRights',
+    right_name     => 'DelegateRights',
     Object        => RT->system,
     principal_type => 'Group',
     principal_id   => $g1->principal_id
@@ -411,7 +411,7 @@
 ok( $ret, "Delegate DelegateRights to pg1: $msg" );
 $ace = RT::Model::ACE->new($u2);
 ( $ret, $msg ) = $ace->load_by_values(
-    Rightname     => 'ShowConfigTab',
+    right_name     => 'ShowConfigTab',
     Object        => RT->system,
     principal_type => 'Group',
     principal_id   => $g2->principal_id

Modified: rt/branches/3.999-DANGEROUS/t/delegation/revocation.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/delegation/revocation.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/delegation/revocation.t	Thu Dec 20 13:21:19 2007
@@ -54,7 +54,7 @@
 
 $ace = RT::Model::ACE->new($u1);
 ( $ret, $msg ) = $ace->load_by_values(
-    Rightname     => 'ShowConfigTab',
+    right_name     => 'ShowConfigTab',
     Object        => RT->system,
     principal_type => 'Group',
     principal_id   => $g1->principal_id

Modified: rt/branches/3.999-DANGEROUS/t/mail/gateway.t
==============================================================================
--- rt/branches/3.999-DANGEROUS/t/mail/gateway.t	(original)
+++ rt/branches/3.999-DANGEROUS/t/mail/gateway.t	Thu Dec 20 13:21:19 2007
@@ -494,7 +494,7 @@
         table2 => 'Transactions',
         column2 => 'id',
     );
-    $attachments->limit( alias => $txn_alias, column => 'ObjectType', value => 'RT::Model::Ticket' );
+    $attachments->limit( alias => $txn_alias, column => 'object_type', value => 'RT::Model::Ticket' );
     $attachments->limit( alias => $txn_alias, column => 'object_id', value => $id );
     is ($attachments->count, 1, 'Found only one gif attached to the ticket');
     my $attachment = $attachments->first;
@@ -741,7 +741,7 @@
 $ace->load( $ace_id );
 $ace->delete;
 my $acl = RT::Model::ACECollection->new(current_user => RT->system_user);
-$acl->limit( column => 'Rightname', value => 'ReplyToTicket' );
+$acl->limit( column => 'right_name', value => 'ReplyToTicket' );
 $acl->LimitToObject( RT->system );
 while( my $ace = $acl->next ) {
 	$ace->delete;


More information about the Rt-commit mailing list