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

How would I configure a single-user "demo" instance without admin powers? #492

Open
jnothman opened this issue Dec 17, 2021 · 6 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@jnothman
Copy link
Contributor

I want to be able to run a demo of Leaf with a non-admin user, without setting up an identity service provider. This allows us to demo the Leaf functionality without exposing the entire database. What would be the easiest way to do this?

(My first attempt, dropping the "admin" claim from the Claims field of the admin user in auth.Login didn't work.)

@jnothman
Copy link
Contributor Author

Found it!

Mask = RoleMask.User | RoleMask.Admin | RoleMask.Super | RoleMask.Identified | RoleMask.Federated,

@ndobb
Copy link
Member

ndobb commented Dec 20, 2021

Yes, that's where I would start as well, @jnothman. If you run into other issues with this please let us know.

@jnothman
Copy link
Contributor Author

We've currently managed to hack this to give a basic user on the basis of an environment variable: ElevnLi@247cf00
Ideally we'd control this from appsettings.json.

@ndobb
Copy link
Member

ndobb commented Jan 12, 2022

Nice work @ElevnLi and @jnothman! We'd love to work these changes in upstream.

How about adding in something like:

"Authorization": {
    "Mechanism": "UNSECURED",
    "AllowAllAuthenticatedUsers": true,
    "UnsecuredIsAdmin": false,
    ...

@jnothman
Copy link
Contributor Author

Happy for that config, we just needed a quick fix for a demo. :)

@ndobb ndobb self-assigned this Jan 12, 2022
@ndobb ndobb added the enhancement New feature or request label Jan 12, 2022
@ndobb
Copy link
Member

ndobb commented Jan 20, 2022

@jnothman I'll work that into our next minor release, seems very straightforward.

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

No branches or pull requests

2 participants