You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getCollectionInfoAndCheckPermission is intended to throw a privilege error if user does not have the specified minimum grant for the requested CollectionId, and returns the collectionId and corresponding grant if they do.
When invoked with elevate=true with a non-existent or disabled collectionId, it returns the collectionId and a grant of "undefined" which allows the request to continue being processed in most cases.
In practice, responses will not have any content, but we should probably short-circuit here and throw a 404 instead of the usual 403 privilege error. However, this currently breaks some tests.
getCollectionInfoAndCheckPermission is intended to throw a privilege error if user does not have the specified minimum grant for the requested CollectionId, and returns the collectionId and corresponding grant if they do.
When invoked with elevate=true with a non-existent or disabled collectionId, it returns the collectionId and a grant of "undefined" which allows the request to continue being processed in most cases.
In practice, responses will not have any content, but we should probably short-circuit here and throw a 404 instead of the usual 403 privilege error. However, this currently breaks some tests.
stig-manager/api/source/controllers/Collection.js
Lines 344 to 353 in 9919996
The text was updated successfully, but these errors were encountered: