System to review and author submissions for a conference XYZ.
See a live demo at https://iptk-uniform.herokuapp.com
Demo Chair User User: asd@asd.de Password: asdasd
- Git
- Node.js and npm Node ^4.2.3, npm ^2.14.7
- Bower (
npm install --global bower
) - Ruby and then
gem install sass
- Grunt (
npm install --global grunt-cli
) - Postgres
-
Run
npm install
to install server dependencies. -
Run
bower install
to install front-end dependencies. -
Copy
app.sh.sample
and name itapp.sh
. -
Modify the
SEQUELIZE_URI
to match your local Postgres-Database Configuration. -
Allow the
app.sh
to be executed by executingchmod +x app.sh
-
Run
./app.sh serve
to start the development server. It should automatically open the client in your browser when ready.
Run ./app.sh serve
for preview.
Running ./app.sh test
will run the integration tests with mocha to ensure that the CRUD functionalities are covered.
Run grunt build
and use the grunt buildcontrol:heroku
command to deploy the assembled dist folder to the production system.
You can adjust the production system repository in the Gruntfile.js
.
While you are operating in the api folder you can use the authentication service by using this line:
import * as auth from '../../auth/auth.service';
Afterwards you are able to check whether a user has certain role:
auth.checkRoles(rolesHeNeeds, rolesHeHas, granted, forbidden)
rolesHeNeeds: String || Array - Role Names that you want to check rolesHeHas: typically you can use req.user.role
granted and forbidden are two functions that you need to provide as callback functions. e.g.
auth.checkRoles(['author', 'chair'], req.user.role, function() { console.log('Granted :)'); res.status(200); }, function() { res.status(403).send('Forbidden'); });
auth.checkRoles('author', req.user.role, function() { console.log('Granted :)'); res.status(200); }, function() { res.status(403).send('Forbidden'); });