-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Accept_roles returning blank /admin page #792
Comments
@fraktar accept_roles:
- admin
- editor Can you try that, please? |
@tech4him1 thanks, but now I get permission denied on all roles. Can't login. My config.yml code looks fine to me https://github.com/fraktar/gutsignal/blob/master/admin/config.yml |
@fraktar Have you tried changing |
I'm beginning to wonder if this is related to #647. |
@tech4him1 yes, already tried that. |
@tech4him1 I'm getting the same results as @fraktar when I set However, if I remove the It works, at least in the sense that I can log in with a user that has the role, and I can't with a user that doesn't. Interestingly, because role-based access control can be handled entirely by Git Gateway (even in the open source version), I wonder if the The main flaw in my test setup with Git Gateway handling the user roles is that the non-authorized user gets a flash of the CMS UI, then kicked back to the login screen, without any error message to explain why. If we set an error for that, maybe that's actually the way to go for this backend. Thinking of possible gotchas to that approach:
|
- Do you want to request a feature or report a bug?
Bug.
- What is the current behavior?
Attempting to restrict access to the Git Gateway/editorial workflow to a role. Both collections and editorial workflow are empty for all roles.
I also get a blank /admin page if I attempt to restrict the role via config.yml. The console outputs this error:
TypeError: (e.getIn(...) || Object(...)(...)).toArray is not a function at new t (cms.js:181) at r (cms.js:18) at cms.js:18 at t.value (cms.js:181) at t.value (cms.js:181) at u (cms.js:163) at beginWork (cms.js:163) at i (cms.js:163) at u (cms.js:163) at c (cms.js:163)
- If the current behavior is a bug, please provide the steps to reproduce.
Tried two methods.
a) Add a role via Identity > Click on a user > Edit settings > Add role and set that role in Identity Settings > Git Gateway settings > Type role > Generate API access token > Save.
b) Add
accept_roles: Role
in /admin/config.yml under backend.- What is the expected behavior?
I'd expect this to allow access to the specified role(s) only.
- Please mention your CMS, node.js, and operating system version.
Netlify CMS version 0.7.0, Node v.4.7.3, Windows 10 x64
Github Repo with all the code
https://github.com/fraktar/gutsignal
Live Demo
https://gutsignal.netlify.com
Possible Hint
https://github.com/netlify/netlify-cms/blob/78b60c0a0bd3b0d3b69b6a88dea7c1209ec475e1/src/backends/git-gateway/implementation.js#L36
The text was updated successfully, but these errors were encountered: