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

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

@@ -49,16 +49,274 @@
 nfig';%0A%0A
+// If we're running locally, we're probably developing and using the test environment APIs%0A// So for the purpose of checking user access, we use 'test', otherwise we can't access anything...%0Aconst ENV = GDL_ENVIRONMENT === 'dev' ? 'test' : GDL_ENVIRONMENT;%0A%0A
 export d
@@ -346,31 +346,19 @@
 admin-$%7B
-GDL_ENVIRONMENT
+ENV
 %7D:read%60,
@@ -376,39 +376,27 @@
 k: %60books-$%7B
-GDL_ENVIRONMENT
+ENV
 %7D:write%60,%0A  
@@ -417,31 +417,19 @@
 mages-$%7B
-GDL_ENVIRONMENT
+ENV
 %7D:write%60

Use TEST for access check while developing (#175)