[Rt-devel] CLI and Web Interface not behaving the same.
Russ Roff
rroff at stny.rr.com
Wed Sep 15 20:04:07 EDT 2004
RT 3.2.1 on Solaris 8.
In 3.0.10 this worked perfectly. This is a new install on a new box using
similar modifications to the lib and html files.
I've added a few columns to the Users table. When I populate data to it via
a script that uses RT::User, it works fine. When I do it via Modify.html,
it acts really flaky and I don't know why.
The user gets created, but it has an ID in the User's table that is +1
incrementally, not the +2 as is usually the case. It "forgets" that a
Principal ACL group exists at the next incremental number and adds the user
with the same ID as the preceeding user's ACL group.
For example - Clean wipe of database, run script to populate Users table
from file. (Everything works as expected, last User ID is 204, Principal
table shows ID 205 is a Group ACL for the last user). Add a User via
Modify.html. The Principal table shows an ID of 205 as a Group still. The
new user gets an ID 205 in the User table. When I try to add that user to a
group, instead of adding it as a User object, it's added as a Group object.
Subsequent new user adds via Modify.html result in "Results" of:
* Object created
* Privileged status: Couldn't find that principal
* Password: The new value has been set.
Modify.html has been modified to incorporate new fields as well. The schema
modifications to the DB have been made manually.
I created ~/local/lib/RT/User_Local.pm as follows (I also tried it with a
similarly hacked Create sub, but that messed up my DB re-inits via the
rt-setup-database script - says it can't add the System user because the
customized columns don't exist):
User_Local.pm:
use strict;
no warnings qw(redefine);
package RT::User;
use RT::Record;
use vars qw( @ISA );
@ISA= qw( RT::Record );
sub _CoreAccessible {
{
id =>
{read => 1, type => 'int(11)', default => ''},
Name =>
{read => 1, write => 1, type => 'varchar(200)', default =>
''},
Password =>
{read => 1, write => 1, type => 'varchar(40)', default =>
''},
Comments =>
{read => 1, write => 1, type => 'blob', default => ''},
Signature =>
{read => 1, write => 1, type => 'blob', default => ''},
EmailAddress =>
{read => 1, write => 1, type => 'varchar(120)', default =>
''},
FreeformContactInfo =>
{read => 1, write => 1, type => 'blob', default => ''},
Organization =>
{read => 1, write => 1, type => 'varchar(200)', default =>
''},
RealName =>
{read => 1, write => 1, type => 'varchar(120)', default =>
''},
NickName =>
{read => 1, write => 1, type => 'varchar(16)', default =>
''},
Lang =>
{read => 1, write => 1, type => 'varchar(16)', default =>
''},
EmailEncoding =>
{read => 1, write => 1, type => 'varchar(16)', default =>
''},
WebEncoding =>
{read => 1, write => 1, type => 'varchar(16)', default =>
''},
ExternalContactInfoId =>
{read => 1, write => 1, type => 'varchar(100)', default =>
''},
ContactInfoSystem =>
{read => 1, write => 1, type => 'varchar(30)', default =>
''},
ExternalAuthId =>
{read => 1, write => 1, type => 'varchar(100)', default =>
''},
AuthSystem =>
{read => 1, write => 1, type => 'varchar(30)', default =>
''},
Gecos =>
{read => 1, write => 1, type => 'varchar(16)', default =>
''},
HomePhone =>
{read => 1, write => 1, type => 'varchar(30)', default =>
''},
WorkPhone =>
{read => 1, write => 1, type => 'varchar(30)', default =>
''},
MobilePhone =>
{read => 1, write => 1, type => 'varchar(30)', default =>
''},
PagerPhone =>
{read => 1, write => 1, type => 'varchar(30)', default =>
''},
Address1 =>
{read => 1, write => 1, type => 'varchar(200)', default =>
''},
Address2 =>
{read => 1, write => 1, type => 'varchar(200)', default =>
''},
City =>
{read => 1, write => 1, type => 'varchar(100)', default =>
''},
State =>
{read => 1, write => 1, type => 'varchar(100)', default =>
''},
Zip =>
{read => 1, write => 1, type => 'varchar(16)', default =>
''},
Country =>
{read => 1, write => 1, type => 'varchar(50)', default =>
''},
Timezone =>
{read => 1, write => 1, type => 'varchar(50)', default =>
''},
PGPKey =>
{read => 1, write => 1, type => 'text', default => ''},
Creator =>
{read => 1, auto => 1, type => 'int(11)', default => '0'},
Created =>
{read => 1, auto => 1, type => 'datetime', default => ''},
LastUpdatedBy =>
{read => 1, auto => 1, type => 'int(11)', default => '0'},
LastUpdated =>
{read => 1, auto => 1, type => 'datetime', default => ''},
SupervisorRealName =>
{read => 1, write => 1, type => 'varchar(120)', default =>
''},
TextMessageAddress =>
{read => 1, write => 1, type => 'varchar(120)', default =>
''},
FaxPhone =>
{read => 1, write => 1, type => 'varchar(30)', default =>
''},
TechNumber =>
{read => 1, write => 1, type => 'varchar(16)', default =>
''},
JobTitle =>
{read => 1, write => 1, type => 'varchar(50)', default =>
''},
}
};
1;
Would someone give the poor old man a clue as to what changed between 3.0.10
and 3.2.1 that broke this otherwise easy modification?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bestpractical.com/pipermail/rt-devel/attachments/20040915/299116e1/attachment.htm
More information about the Rt-devel
mailing list