Zendro-dev / graphql-server

Skeleton NodeJS project for a graphQL server.
GNU General Public License v3.0
0 stars 1 forks source link

Switch on or off access control through an environment variable #13

Open asishallab opened 5 years ago

asishallab commented 5 years ago

Currently access control is carried out with the ACL package. For this we declare access rights in the file acl_rules.js.

The graphql-server can be started with the additional acl command line switch. If present access rights are checked within every resolver invoked by responding to an incoming GraphQL query.

Move the above command line switch into an environment variable called ACCESS_CONTROL. If and only if this variable is set to the value true, access control is switched on. The default should be to have it switched off.

Please add documentation about access control and how to define the various control rights in acl_rules.js. The documentation should be in our manual, as a reference to the manual in the respective graphql-server README, and also as a reference to the manual in the ScienceDbStarterPack README. In the latter please update the existing documentation so that it fits the changes and use a reference rather than duplicating documentation in two places.

Expected work time: 2h