This commit is contained in:
@@ -238,53 +238,53 @@ namespace AyaNova.DataList
|
||||
//
|
||||
internal static async Task<long[]> GetIdListResponseAsync(AyContext ct, DataListSelectedProcessingOptions dataListSelectionOptions,IDataListProcessing DataList, AuthorizationRoles userRoles, ILogger log, long userId)
|
||||
{
|
||||
// var DataList = DataListFactory.GetAyaDataList(dataListSelectionOptions.DataListKey);
|
||||
// //was the name not found as a list?
|
||||
// if (DataList == null)
|
||||
// throw new System.ArgumentOutOfRangeException($"DataList \"{dataListSelectionOptions.DataListKey}\" specified does not exist");
|
||||
// // var DataList = DataListFactory.GetAyaDataList(dataListSelectionOptions.DataListKey);
|
||||
// // //was the name not found as a list?
|
||||
// // if (DataList == null)
|
||||
// // throw new System.ArgumentOutOfRangeException($"DataList \"{dataListSelectionOptions.DataListKey}\" specified does not exist");
|
||||
|
||||
|
||||
|
||||
//check rights
|
||||
if (!userRoles.HasAnyFlags(DataList.AllowedRoles))
|
||||
throw new System.UnauthorizedAccessException("User roles insufficient for this datalist");
|
||||
// //check rights
|
||||
// if (!userRoles.HasAnyFlags(DataList.AllowedRoles))
|
||||
// throw new System.UnauthorizedAccessException("User roles insufficient for this datalist");
|
||||
|
||||
// //do we need to default the listView?
|
||||
// if (string.IsNullOrWhiteSpace(listView))
|
||||
// listView = DataList.DefaultListView;
|
||||
// // //do we need to default the listView?
|
||||
// // if (string.IsNullOrWhiteSpace(listView))
|
||||
// // listView = DataList.DefaultListView;
|
||||
|
||||
DataList.SetListOptionDefaultsIfNecessary(dataListSelectionOptions);
|
||||
// DataList.SetListOptionDefaultsIfNecessary(dataListSelectionOptions);
|
||||
|
||||
// //parse the list view
|
||||
// var ListViewArray = JArray.Parse(listView);
|
||||
// // //parse the list view
|
||||
// // var ListViewArray = JArray.Parse(listView);
|
||||
|
||||
|
||||
// //Hard coded extra criteria from server end
|
||||
// if (DataList is IAyaDataListServerCriteria)
|
||||
// {
|
||||
// var ServerCriteriaListView = JArray.Parse(((IAyaDataListServerCriteria)DataList).DataListServerCriteria(await ct.User.AsNoTracking().FirstOrDefaultAsync(z => z.Id == userId), ct));
|
||||
// foreach (JToken jt in ServerCriteriaListView)
|
||||
// ListViewArray.Add(jt);
|
||||
// }
|
||||
// // //Hard coded extra criteria from server end
|
||||
// // if (DataList is IAyaDataListServerCriteria)
|
||||
// // {
|
||||
// // var ServerCriteriaListView = JArray.Parse(((IAyaDataListServerCriteria)DataList).DataListServerCriteria(await ct.User.AsNoTracking().FirstOrDefaultAsync(z => z.Id == userId), ct));
|
||||
// // foreach (JToken jt in ServerCriteriaListView)
|
||||
// // ListViewArray.Add(jt);
|
||||
// // }
|
||||
|
||||
//STATIC filter options from server
|
||||
List<DataListFilterOption> StaticServerFilterOptions = null;
|
||||
if (DataList is IDataListInternalCriteria)
|
||||
StaticServerFilterOptions = ((IDataListInternalCriteria)DataList).DataListInternalCriteria(userId, userRoles, dataListSelectionOptions);
|
||||
// //STATIC filter options from server
|
||||
// List<DataListFilterOption> StaticServerFilterOptions = null;
|
||||
// if (DataList is IDataListInternalCriteria)
|
||||
// StaticServerFilterOptions = ((IDataListInternalCriteria)DataList).DataListInternalCriteria(userId, userRoles, dataListSelectionOptions);
|
||||
|
||||
//Add the internal filters into the listoptions existing filters
|
||||
//NOTE: There is currently no overlap between internal filtered columns and filters coming from the client
|
||||
foreach (DataListFilterOption dfo in StaticServerFilterOptions)
|
||||
dataListSelectionOptions.Filter.Add(dfo);
|
||||
// //Add the internal filters into the listoptions existing filters
|
||||
// //NOTE: There is currently no overlap between internal filtered columns and filters coming from the client
|
||||
// foreach (DataListFilterOption dfo in StaticServerFilterOptions)
|
||||
// dataListSelectionOptions.Filter.Add(dfo);
|
||||
|
||||
// //Hard coded extra criteria from Client end
|
||||
// //parse and combine any additional listview hard coded from Client UI
|
||||
// var MetaListViewArray = JArray.Parse(metaListView ?? "[]");
|
||||
// foreach (JToken jt in MetaListViewArray)
|
||||
// ListViewArray.Add(jt);
|
||||
// // //Hard coded extra criteria from Client end
|
||||
// // //parse and combine any additional listview hard coded from Client UI
|
||||
// // var MetaListViewArray = JArray.Parse(metaListView ?? "[]");
|
||||
// // foreach (JToken jt in MetaListViewArray)
|
||||
// // ListViewArray.Add(jt);
|
||||
|
||||
// //Get the field key names in a list from the listview
|
||||
// List<string> ListViewFieldList = DataList.GetFieldListFromListView(ListViewArray);
|
||||
// // //Get the field key names in a list from the listview
|
||||
// // List<string> ListViewFieldList = DataList.GetFieldListFromListView(ListViewArray);
|
||||
|
||||
//BUILD THE QUERY
|
||||
//SELECT FRAGMENT COLUMNS FROM TEMPLATE
|
||||
|
||||
Reference in New Issue
Block a user