// @flow
import { GDL_ENVIRONMENT } from 'gdl-config';

export default {
  readAdmin: `admin-${GDL_ENVIRONMENT}:read`,
  writeBook: `books-${GDL_ENVIRONMENT}:write`,
  writeImage: `images-${GDL_ENVIRONMENT}:write`
};

// @flow
import { GDL_ENVIRONMENT } from 'gdl-config';

// If we're running locally, we're probably developing and using the test environment APIs
// So for the purpose of checking user access, we use 'test', otherwise we can't access anything...
const ENV = GDL_ENVIRONMENT === 'dev' ? 'test' : GDL_ENVIRONMENT;

export default {
  readAdmin: `admin-${ENV}:read`,
  writeBook: `books-${ENV}:write`,
  writeImage: `images-${ENV}:write`
};

Use TEST for access check while developing (#175)