This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -45,7 +45,7 @@
|
|||||||
//"AYANOVA_LOG_LEVEL": "Debug",
|
//"AYANOVA_LOG_LEVEL": "Debug",
|
||||||
"AYANOVA_DEFAULT_TRANSLATION": "en",
|
"AYANOVA_DEFAULT_TRANSLATION": "en",
|
||||||
//TRANSLATION MUST BE en for Integration TESTING
|
//TRANSLATION MUST BE en for Integration TESTING
|
||||||
//"AYANOVA_PERMANENTLY_ERASE_DATABASE": "true",
|
"AYANOVA_PERMANENTLY_ERASE_DATABASE": "true",
|
||||||
"AYANOVA_DB_CONNECTION": "Server=localhost;Username=postgres;Password=raven;Database=AyaNova;",
|
"AYANOVA_DB_CONNECTION": "Server=localhost;Username=postgres;Password=raven;Database=AyaNova;",
|
||||||
"AYANOVA_USE_URLS": "http://*:7575;",
|
"AYANOVA_USE_URLS": "http://*:7575;",
|
||||||
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
|
||||||
|
|||||||
139
server/AyaNova/DataList/EventDataList.cs
Normal file
139
server/AyaNova/DataList/EventDataList.cs
Normal file
@@ -0,0 +1,139 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
|
using AyaNova.Biz;
|
||||||
|
namespace AyaNova.DataList
|
||||||
|
{
|
||||||
|
internal class EventDataList : AyaDataList
|
||||||
|
{
|
||||||
|
|
||||||
|
public EventDataList()
|
||||||
|
{
|
||||||
|
//NOTE: used this type because it's full BizFull and read only BizLimited only which is appropriate and there is no event type
|
||||||
|
DefaultListObjectType = AyaType.Global;
|
||||||
|
SQLFrom = "from aevent";
|
||||||
|
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||||
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
|
|
||||||
|
//Default ListView
|
||||||
|
dynamic dlistView = new JArray();
|
||||||
|
|
||||||
|
dynamic cm = new JObject();
|
||||||
|
cm.fld = "username";
|
||||||
|
dlistView.Add(cm);
|
||||||
|
|
||||||
|
cm = new JObject();
|
||||||
|
cm.fld = "useremployeenumber";
|
||||||
|
dlistView.Add(cm);
|
||||||
|
|
||||||
|
cm = new JObject();
|
||||||
|
cm.fld = "usertype";
|
||||||
|
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);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//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 = "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 = "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 = "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
|
||||||
|
|
||||||
|
// 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
|
||||||
@@ -406,7 +406,7 @@ namespace AyaNova.Biz
|
|||||||
});
|
});
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
//LOGFILE
|
//LOGFILE - server log, not event log
|
||||||
//
|
//
|
||||||
roles.Add(AyaType.LogFile, new BizRoleSet()
|
roles.Add(AyaType.LogFile, new BizRoleSet()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user