What is the issue?
While working on this issue : #567 , there were a lot of failures in test cases, one of which was failure of this Test: FindTestWithDifferentMappedFieldsAndOrderBy(), and there are other tests similar to this one.
As it turned out, the request failed in AuthorizationResolver.AreColumnsAllowedForAction() authorization check stage. On closer inspection, I found out that the issue is arising because the RestRequestContext.OrderByClauseInUrl (which is a list of OrderByColumns) has the column names already as backing columns.
(See how the OrderByClause is populated in RequestParser.GenerateOrderByList()).
The expectation in AuthorizationResolver.AreColumnsAllowedForAction() is that the columns argument passed to it has exposedColumnNames, and not backing column names. However the OrderByClauseInUrl has backing column names, which are added to the column IEnum, and hence we don't find a mapping from a backing column name and we get an exception at AuthorizationResolver.AreColumnsAllowedForAction() , Line 143.
What is the issue?
While working on this issue : #567 , there were a lot of failures in test cases, one of which was failure of this Test:
FindTestWithDifferentMappedFieldsAndOrderBy(), and there are other tests similar to this one.As it turned out, the request failed in
AuthorizationResolver.AreColumnsAllowedForAction()authorization check stage. On closer inspection, I found out that the issue is arising because the RestRequestContext.OrderByClauseInUrl (which is a list of OrderByColumns) has the column names already as backing columns.(See how the OrderByClause is populated in
RequestParser.GenerateOrderByList()).The expectation in AuthorizationResolver.AreColumnsAllowedForAction() is that the
columnsargument passed to it has exposedColumnNames, and not backing column names. However the OrderByClauseInUrl has backing column names, which are added to thecolumnIEnum, and hence we don't find a mapping from a backing column name and we get an exception atAuthorizationResolver.AreColumnsAllowedForAction() , Line 143.