Files
notifications-admin/tests
Leo Hemsted 61cbdac09d remove mock_has_permissions from logged_in_client
mock_has_permissions blindly returns True - this is useful for the
decorators on most endpoints checking if the user has permission to
access endpoints about the provided service, but is not useful when
it returns true to such checks as "if user is platform admin, show
secret stuff", despite the logged in user being
"active_user_with_permissions" rather than a platform admin.

So remove this, and add "logged_in_platform_admin_client" for when we
want to explicitly check platform admin functionality.

This has the advantage of the actual permissions code being checked
in tests, so the test environment is more consistent with the real
world.

Several tests will have to change now though - active_user_with_perms
has permissions for service_one, so most tests should now call
client.get(url_for(..., service_id=service_one['id']) or they'll 403
2017-02-17 09:44:53 +00:00
..