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

Admin Access #429

Open
dbhurley opened this issue Nov 7, 2019 · 2 comments
Open

Admin Access #429

dbhurley opened this issue Nov 7, 2019 · 2 comments

Comments

@dbhurley
Copy link

dbhurley commented Nov 7, 2019

I'm sorry for the newb question. I see the /admin routes and admin folder with extended functionality but can't seem to access the admin interface in any way. I also noticed I have to use a social sign-on to be able to access, and yet there's JWT and user profiles in the code. What am I doing wrong?

@vashisth00
Copy link

vashisth00 commented Jul 22, 2021

"message": "Anonymous access is denied.",

Same issue for me here

query User {
 users {
   edges {
     node {
       id
     }
   }
 }
}

@koistya
Copy link
Member

koistya commented Jul 23, 2021

@vashisth00 the users top-level query field is set to be accessed by admin users only, you can disable it here:

// Only admins are allowed to fetch the list of users
ctx.ensureIsAuthorized(user => user.isAdmin);
const query = db.table('users');
****

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

3 participants