This commit is contained in:
@@ -364,7 +364,11 @@ namespace AyaNova.Biz
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//LOGIN must be unique
|
||||
if (await ct.User.AnyAsync(m => m.Login == proposedObj.Login && m.Id != proposedObj.Id))
|
||||
{
|
||||
AddError(ApiErrorCode.VALIDATION_NOT_UNIQUE, "Login");
|
||||
}
|
||||
|
||||
//TODO: Validation rules that require future other objects that aren't present yet:
|
||||
/*
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace AyaNova.Util
|
||||
private const int DESIRED_SCHEMA_LEVEL = 11;
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 272;
|
||||
internal const long EXPECTED_INDEX_COUNT = 118;
|
||||
internal const long EXPECTED_INDEX_COUNT = 119;
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace AyaNova.Util
|
||||
|
||||
//Add user table
|
||||
await ExecQueryAsync("CREATE TABLE auser (id BIGSERIAL PRIMARY KEY, active bool not null, name varchar(255) not null unique, " +
|
||||
"login text not null, password text not null, salt text not null, roles integer not null, currentauthtoken text, " +
|
||||
"login text not null unique, password text not null, salt text not null, roles integer not null, currentauthtoken text, " +
|
||||
"dlkey text, dlkeyexpire timestamp, usertype integer not null, employeenumber varchar(255), notes text, customerid bigint, " +
|
||||
"headofficeid bigint, subvendorid bigint, wiki text null, customfields text, tags varchar(255) ARRAY)");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user