LPS-40597 Fixed existing tests to work with the document library permissions
LPS-40597 Added extra tests for new features and use cases
LPS-40597 Added upgrade for permissions