This commit is contained in:
@@ -76,6 +76,8 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
List<KeyValuePair<string, string>> ret = new List<KeyValuePair<string, string>>();
|
||||
ret.Add(new KeyValuePair<string, string>(StringUtil.TrimTypeName(typeof(UserType).ToString()), "AyaNova user account types"));
|
||||
ret.Add(new KeyValuePair<string, string>("insideusertype", "AyaNova user account types for staff / contractors"));
|
||||
ret.Add(new KeyValuePair<string, string>("outsideusertype", "AyaNova user account types for customer / headoffice users"));
|
||||
ret.Add(new KeyValuePair<string, string>(StringUtil.TrimTypeName(typeof(AuthorizationRoles).ToString()), "AyaNova user account role types"));
|
||||
ret.Add(new KeyValuePair<string, string>(StringUtil.TrimTypeName(typeof(AyaType).ToString()), "All AyaNova object types"));
|
||||
ret.Add(new KeyValuePair<string, string>("Core", "All Core AyaNova business object types"));
|
||||
@@ -169,23 +171,43 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(UserType).ToString()).ToLowerInvariant())
|
||||
{
|
||||
TranslationKeysToFetch.Add("UserTypeAdministrator");
|
||||
|
||||
TranslationKeysToFetch.Add("UserTypeService");
|
||||
TranslationKeysToFetch.Add("UserTypeNotService");
|
||||
TranslationKeysToFetch.Add("UserTypeCustomer");
|
||||
TranslationKeysToFetch.Add("UserTypeHeadOffice");
|
||||
TranslationKeysToFetch.Add("UserTypeServiceContractor");
|
||||
TranslationKeysToFetch.Add("UserTypeUtility");
|
||||
var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, translationId);
|
||||
|
||||
ReturnList.Add(new NameIdItem() { Name = LT["UserTypeAdministrator"], Id = (long)UserType.Administrator });
|
||||
ReturnList.Add(new NameIdItem() { Name = LT["UserTypeService"], Id = (long)UserType.Service });
|
||||
ReturnList.Add(new NameIdItem() { Name = LT["UserTypeNotService"], Id = (long)UserType.NotService });
|
||||
ReturnList.Add(new NameIdItem() { Name = LT["UserTypeCustomer"], Id = (long)UserType.Customer });
|
||||
ReturnList.Add(new NameIdItem() { Name = LT["UserTypeHeadOffice"], Id = (long)UserType.HeadOffice });
|
||||
ReturnList.Add(new NameIdItem() { Name = LT["UserTypeUtility"], Id = (long)UserType.Utility });
|
||||
ReturnList.Add(new NameIdItem() { Name = LT["UserTypeServiceContractor"], Id = (long)UserType.ServiceContractor });
|
||||
}
|
||||
else if (keyNameInLowerCase == "insideusertype")
|
||||
{
|
||||
|
||||
TranslationKeysToFetch.Add("UserTypeService");
|
||||
TranslationKeysToFetch.Add("UserTypeNotService");
|
||||
TranslationKeysToFetch.Add("UserTypeServiceContractor");
|
||||
var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, translationId);
|
||||
|
||||
ReturnList.Add(new NameIdItem() { Name = LT["UserTypeService"], Id = (long)UserType.Service });
|
||||
ReturnList.Add(new NameIdItem() { Name = LT["UserTypeNotService"], Id = (long)UserType.NotService });
|
||||
ReturnList.Add(new NameIdItem() { Name = LT["UserTypeServiceContractor"], Id = (long)UserType.ServiceContractor });
|
||||
}
|
||||
else if (keyNameInLowerCase == "outsideusertype")
|
||||
{
|
||||
|
||||
|
||||
TranslationKeysToFetch.Add("UserTypeCustomer");
|
||||
TranslationKeysToFetch.Add("UserTypeHeadOffice");
|
||||
var LT = await TranslationBiz.GetSubsetStaticAsync(TranslationKeysToFetch, translationId);
|
||||
|
||||
ReturnList.Add(new NameIdItem() { Name = LT["UserTypeCustomer"], Id = (long)UserType.Customer });
|
||||
ReturnList.Add(new NameIdItem() { Name = LT["UserTypeHeadOffice"], Id = (long)UserType.HeadOffice });
|
||||
}
|
||||
else if (keyNameInLowerCase == StringUtil.TrimTypeName(typeof(AyaEvent).ToString()).ToLowerInvariant())
|
||||
{
|
||||
TranslationKeysToFetch.Add("EventDeleted");
|
||||
@@ -355,7 +377,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
else
|
||||
{
|
||||
ReturnList.Add(new NameIdItem() { Name = $"Unknown enum type list key value {enumKey}", Id = (long)UserType.Administrator });
|
||||
ReturnList.Add(new NameIdItem() { Name = $"Unknown enum type list key value {enumKey}", Id = 0 });
|
||||
}
|
||||
|
||||
return ReturnList;
|
||||
|
||||
@@ -262,11 +262,60 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
|
||||
private bool UserExists(long id)
|
||||
/// <summary>
|
||||
/// Get list of Users
|
||||
/// (rights to User object required)
|
||||
/// </summary>
|
||||
/// <returns>All "inside" Users (except Customer and HeadOffice type)</returns>
|
||||
[HttpGet("list")]
|
||||
public async Task<IActionResult> GetInsideUserList()
|
||||
{
|
||||
return ct.User.Any(z => z.Id == id);
|
||||
if (serverState.IsClosed)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.User))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
|
||||
|
||||
var ret = await ct.User.Where(z => z.UserType != UserType.Customer && z.UserType != UserType.HeadOffice).Select(z => new dtUser
|
||||
{
|
||||
Id = z.Id,
|
||||
Active = z.Active,
|
||||
Name = z.Name,
|
||||
Roles = z.Roles,
|
||||
UserType = z.UserType,
|
||||
EmployeeNumber = z.EmployeeNumber,
|
||||
LastLogin = z.LastLogin
|
||||
|
||||
}).ToListAsync();
|
||||
return Ok(ApiOkResponse.Response(ret));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get list of Customer / Head office Users
|
||||
/// (Rights to Customer object required)
|
||||
/// </summary>
|
||||
/// <returns>All "outside" Users (No staff or contractors)</returns>
|
||||
[HttpGet("outlist")]
|
||||
public async Task<IActionResult> GetOutsideUserList()
|
||||
{
|
||||
if (serverState.IsClosed)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, AyaType.Customer))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
|
||||
var ret = await ct.User.Where(z => z.UserType == UserType.Customer || z.UserType == UserType.HeadOffice).Select(z => new dtUser
|
||||
{
|
||||
Id = z.Id,
|
||||
Active = z.Active,
|
||||
Name = z.Name,
|
||||
UserType = z.UserType,
|
||||
LastLogin = z.LastLogin
|
||||
|
||||
}).ToListAsync();
|
||||
return Ok(ApiOkResponse.Response(ret));
|
||||
}
|
||||
|
||||
//------------
|
||||
|
||||
|
||||
@@ -1,138 +1,140 @@
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using AyaNova.Biz;
|
||||
namespace AyaNova.DataList
|
||||
{
|
||||
internal class UserDataList : AyaDataList
|
||||
{
|
||||
//##### DEPRECATED, using fixed list in UserController now
|
||||
|
||||
public UserDataList()
|
||||
{
|
||||
DefaultListObjectType = AyaType.User;
|
||||
SQLFrom = "from auser";
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
// using System.Collections.Generic;
|
||||
// using Newtonsoft.Json.Linq;
|
||||
// using AyaNova.Biz;
|
||||
// namespace AyaNova.DataList
|
||||
// {
|
||||
// internal class UserDataList : AyaDataList
|
||||
// {
|
||||
|
||||
//Default ListView
|
||||
dynamic dlistView = new JArray();
|
||||
// public UserDataList()
|
||||
// {
|
||||
// DefaultListObjectType = AyaType.User;
|
||||
// SQLFrom = "from auser";
|
||||
// var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||
// AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
|
||||
dynamic cm = new JObject();
|
||||
cm.fld = "username";
|
||||
dlistView.Add(cm);
|
||||
// //Default ListView
|
||||
// dynamic dlistView = new JArray();
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "useremployeenumber";
|
||||
dlistView.Add(cm);
|
||||
// dynamic cm = new JObject();
|
||||
// cm.fld = "username";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "usertype";
|
||||
dlistView.Add(cm);
|
||||
// cm = new JObject();
|
||||
// cm.fld = "useremployeenumber";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "useractive";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "userlastlogin";
|
||||
dlistView.Add(cm);
|
||||
// cm = new JObject();
|
||||
// cm.fld = "usertype";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "userroles";
|
||||
dlistView.Add(cm);
|
||||
// cm = new JObject();
|
||||
// cm.fld = "useractive";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "userlastlogin";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
// cm = new JObject();
|
||||
// cm.fld = "userroles";
|
||||
// dlistView.Add(cm);
|
||||
|
||||
|
||||
|
||||
|
||||
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||
// DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
|
||||
|
||||
//NOTE: Due to the join, all the sql id and name fields that can conflict with the joined (in this case User) table need to be specified completely
|
||||
FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||
//DPRECATED FieldDefinitions.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.User, SqlIdColumnName = "auser.id" });
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "User",
|
||||
FieldKey = "username",
|
||||
AyaObjectType = (int)AyaType.User,
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlIdColumnName = "auser.id",
|
||||
SqlValueColumnName = "auser.name",
|
||||
IsRowId = true
|
||||
});
|
||||
// //NOTE: Due to the join, all the sql id and name fields that can conflict with the joined (in this case User) table need to be specified completely
|
||||
// FieldDefinitions = new List<AyaDataListFieldDefinition>();
|
||||
// //DPRECATED FieldDefinitions.Add(new AyaDataListFieldDefinition { FieldKey = "df", AyaObjectType = (int)AyaType.User, SqlIdColumnName = "auser.id" });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
// {
|
||||
// TKey = "User",
|
||||
// FieldKey = "username",
|
||||
// AyaObjectType = (int)AyaType.User,
|
||||
// UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
// SqlIdColumnName = "auser.id",
|
||||
// SqlValueColumnName = "auser.name",
|
||||
// IsRowId = true
|
||||
// });
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "Active",
|
||||
FieldKey = "useractive",
|
||||
UiFieldDataType = (int)UiFieldDataType.Bool,
|
||||
SqlValueColumnName = "auser.active"
|
||||
});
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
// {
|
||||
// TKey = "Active",
|
||||
// FieldKey = "useractive",
|
||||
// UiFieldDataType = (int)UiFieldDataType.Bool,
|
||||
// SqlValueColumnName = "auser.active"
|
||||
// });
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "AuthorizationRoles",
|
||||
FieldKey = "userroles",
|
||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AuthorizationRoles).ToString()),
|
||||
SqlValueColumnName = "auser.roles"
|
||||
});
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
// {
|
||||
// TKey = "AuthorizationRoles",
|
||||
// FieldKey = "userroles",
|
||||
// UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||
// EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(AuthorizationRoles).ToString()),
|
||||
// SqlValueColumnName = "auser.roles"
|
||||
// });
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "LastLogin",
|
||||
FieldKey = "userlastlogin",
|
||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
SqlValueColumnName = "auser.lastlogin"
|
||||
});
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
// {
|
||||
// TKey = "LastLogin",
|
||||
// FieldKey = "userlastlogin",
|
||||
// UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
// SqlValueColumnName = "auser.lastlogin"
|
||||
// });
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "UserType",
|
||||
FieldKey = "usertype",
|
||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(UserType).ToString()),
|
||||
SqlValueColumnName = "auser.usertype"
|
||||
});
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
// {
|
||||
// TKey = "UserType",
|
||||
// FieldKey = "usertype",
|
||||
// UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||
// EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(UserType).ToString()),
|
||||
// SqlValueColumnName = "auser.usertype"
|
||||
// });
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "UserEmployeeNumber",
|
||||
FieldKey = "useremployeenumber",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "auser.employeenumber"
|
||||
});
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
// {
|
||||
// TKey = "UserEmployeeNumber",
|
||||
// FieldKey = "useremployeenumber",
|
||||
// UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
// SqlValueColumnName = "auser.employeenumber"
|
||||
// });
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "UserNotes",
|
||||
FieldKey = "usernotes",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "auser.notes"
|
||||
});
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
// {
|
||||
// TKey = "UserNotes",
|
||||
// FieldKey = "usernotes",
|
||||
// UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
// SqlValueColumnName = "auser.notes"
|
||||
// });
|
||||
|
||||
|
||||
// //-------------------------
|
||||
//NOT SURE ABOUT CUSTOM FIELDS
|
||||
//NEED TO COME BACK TO THIS ONCE CLIENT IS CONSUMING THESE LISTS
|
||||
//WIDGETLIST has custom fields so good test before doing here
|
||||
// // //-------------------------
|
||||
// //NOT SURE ABOUT CUSTOM FIELDS
|
||||
// //NEED TO COME BACK TO THIS ONCE CLIENT IS CONSUMING THESE LISTS
|
||||
// //WIDGETLIST has custom fields so good test before doing here
|
||||
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom1", FieldKey = "widgetcustom1", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom2", FieldKey = "widgetcustom2", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom3", FieldKey = "widgetcustom3", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom4", FieldKey = "widgetcustom4", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom5", FieldKey = "widgetcustom5", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom6", FieldKey = "widgetcustom6", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom7", FieldKey = "widgetcustom7", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom8", FieldKey = "widgetcustom8", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom9", FieldKey = "widgetcustom9", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom10", FieldKey = "widgetcustom10", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom11", FieldKey = "widgetcustom11", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom12", FieldKey = "widgetcustom12", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom13", FieldKey = "widgetcustom13", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom14", FieldKey = "widgetcustom14", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom15", FieldKey = "widgetcustom15", IsCustomField = true });
|
||||
// FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom16", FieldKey = "widgetcustom16", IsCustomField = true });
|
||||
}
|
||||
}//eoc
|
||||
}//eons
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom1", FieldKey = "widgetcustom1", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom2", FieldKey = "widgetcustom2", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom3", FieldKey = "widgetcustom3", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom4", FieldKey = "widgetcustom4", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom5", FieldKey = "widgetcustom5", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom6", FieldKey = "widgetcustom6", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom7", FieldKey = "widgetcustom7", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom8", FieldKey = "widgetcustom8", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom9", FieldKey = "widgetcustom9", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom10", FieldKey = "widgetcustom10", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom11", FieldKey = "widgetcustom11", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom12", FieldKey = "widgetcustom12", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom13", FieldKey = "widgetcustom13", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom14", FieldKey = "widgetcustom14", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom15", FieldKey = "widgetcustom15", IsCustomField = true });
|
||||
// // FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "WidgetCustom16", FieldKey = "widgetcustom16", IsCustomField = true });
|
||||
// }
|
||||
// }//eoc
|
||||
// }//eons
|
||||
@@ -31,7 +31,7 @@ namespace AyaNova.Biz
|
||||
u.Roles = AuthorizationRoles.All;//AuthorizationRoles.BizAdminFull | AuthorizationRoles.OpsAdminFull | AuthorizationRoles.DispatchFull | AuthorizationRoles.InventoryFull;
|
||||
|
||||
|
||||
u.UserType = UserType.Administrator;
|
||||
u.UserType = UserType.NotService;
|
||||
u.UserOptions = new UserOptions();
|
||||
u.UserOptions.TranslationId = ServerBootConfig.AYANOVA_DEFAULT_TRANSLATION_ID;//Ensure primeTranslations is called first
|
||||
await ct.User.AddAsync(u);
|
||||
|
||||
@@ -4,13 +4,11 @@ namespace AyaNova.Biz
|
||||
/// AyaNova User types
|
||||
/// </summary>
|
||||
public enum UserType : int
|
||||
{
|
||||
Administrator = 1,
|
||||
Service = 2,
|
||||
NotService = 3,
|
||||
Customer = 4,
|
||||
HeadOffice = 5,
|
||||
Utility = 6,
|
||||
ServiceContractor = 7
|
||||
{
|
||||
Service = 1,
|
||||
NotService = 2,
|
||||
Customer = 3,
|
||||
HeadOffice = 4,
|
||||
ServiceContractor = 5
|
||||
}
|
||||
}//eons
|
||||
|
||||
@@ -530,9 +530,9 @@ namespace AyaNova.Util
|
||||
await GenSeedUserAsync(log, 1, AuthorizationRoles.OpsAdminLimited, UserType.NotService, false, "TEST_INACTIVE", "TEST_INACTIVE", 0, KnownUserTags);
|
||||
|
||||
//Alternate translation users for each stock translation
|
||||
await GenSeedUserAsync(log, 1, AuthorizationRoles.All, UserType.Administrator, true, "de", "de", await TranslationBiz.TranslationNameToIdStaticAsync("de"), KnownUserTags);
|
||||
await GenSeedUserAsync(log, 1, AuthorizationRoles.All, UserType.Administrator, true, "es", "es", await TranslationBiz.TranslationNameToIdStaticAsync("es"), KnownUserTags);
|
||||
await GenSeedUserAsync(log, 1, AuthorizationRoles.All, UserType.Administrator, true, "fr", "fr", await TranslationBiz.TranslationNameToIdStaticAsync("fr"), KnownUserTags);
|
||||
await GenSeedUserAsync(log, 1, AuthorizationRoles.All, UserType.NotService, true, "de", "de", await TranslationBiz.TranslationNameToIdStaticAsync("de"), KnownUserTags);
|
||||
await GenSeedUserAsync(log, 1, AuthorizationRoles.All, UserType.NotService, true, "es", "es", await TranslationBiz.TranslationNameToIdStaticAsync("es"), KnownUserTags);
|
||||
await GenSeedUserAsync(log, 1, AuthorizationRoles.All, UserType.NotService, true, "fr", "fr", await TranslationBiz.TranslationNameToIdStaticAsync("fr"), KnownUserTags);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user