Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Only STAFF members are allowed to entry before DemocracyOS is initialized. #1661

Open
crass opened this issue Sep 30, 2019 · 1 comment

Comments

@crass
Copy link

crass commented Sep 30, 2019

I've set up a development instance on a local server and signed up with the email I set in STAFF, following the installation instructions. Since I'm in development mode, the account is automatically verified. When I login with a bad password I get, correctly, an error saying invalid email or password. And when I try to login I get the following error. It is my understanding that I must first login to configure a forum. Has anyone else encountered this, know how to work around it, or have an idea of what I might have done wrong?

  democracyos:db-api:forum Searching for forum with name undefined +342ms
  democracyos:db-api:forum No forum found with name undefined +9ms
Error: Only STAFF members are allowed to entry before DemocracyOS is initialized.
    at module.exports.canManage (/home/user/democracyos.git/lib/middlewares/user/index.js:33:12)
    at Layer.handle [as handle_request] (/home/user/democracyos.git/node_modules/express/lib/router/layer.js:95:5)
    at next (/home/user/democracyos.git/node_modules/express/lib/router/route.js:137:13)
    at /home/user/democracyos.git/lib/middlewares/forum-middlewares/index.js:97:5
    at Query.<anonymous> (/home/user/democracyos.git/lib/db-api/forum.js:165:16)
    at /home/user/democracyos.git/node_modules/kareem/index.js:273:21
    at /home/user/democracyos.git/node_modules/kareem/index.js:131:16
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)
@marcocastignoli
Copy link

Hey I had the same problem, the solution is to add your email in an environment variable called STAFF.

If you are using docker then you have to edit the file docker/.env and add
[email protected]

This variable is then transfromed into an array so if you have multiple staff members just put commas between the emails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants