-our %FRIENDLY_OBJECT_TYPES = ();
-
-RT::CustomField->_ForObjectType( 'RT::Queue-RT::Ticket' => "Tickets", ); #loc
-RT::CustomField->_ForObjectType(
- 'RT::Queue-RT::Ticket-RT::Transaction' => "Ticket Transactions", ); #loc
-RT::CustomField->_ForObjectType( 'RT::User' => "Users", ); #loc
-RT::CustomField->_ForObjectType( 'RT::Queue' => "Queues", ); #loc
-RT::CustomField->_ForObjectType( 'RT::Group' => "Groups", ); #loc
-
-our $RIGHTS = {
- SeeCustomField => 'View custom fields', # loc_pair
- AdminCustomField => 'Create, modify and delete custom fields', # loc_pair
- AdminCustomFieldValues => 'Create, modify and delete custom fields values', # loc_pair
- ModifyCustomField => 'Add, modify and delete custom field values for objects' # loc_pair
-};
-
-our $RIGHT_CATEGORIES = {
- SeeCustomField => 'General',
- AdminCustomField => 'Admin',
- AdminCustomFieldValues => 'Admin',
- ModifyCustomField => 'Staff',
-};
-
-# Tell RT::ACE that this sort of object can get acls granted
-$RT::ACE::OBJECT_TYPES{'RT::CustomField'} = 1;
-
-__PACKAGE__->AddRights(%$RIGHTS);
-__PACKAGE__->AddRightCategories(%$RIGHT_CATEGORIES);
-
-=head2 AddRights C<RIGHT>, C<DESCRIPTION> [, ...]
-
-Adds the given rights to the list of possible rights. This method
-should be called during server startup, not at runtime.
-
-=cut
-
-sub AddRights {
- my $self = shift;
- my %new = @_;
- $RIGHTS = { %$RIGHTS, %new };
- %RT::ACE::LOWERCASERIGHTNAMES = ( %RT::ACE::LOWERCASERIGHTNAMES,
- map { lc($_) => $_ } keys %new);
-}
-
-sub AvailableRights {
- my $self = shift;
- return $RIGHTS;
-}
-
-=head2 RightCategories
-
-Returns a hashref where the keys are rights for this type of object and the
-values are the category (General, Staff, Admin) the right falls into.