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

Flex users - problem with authorization #2444

Closed
lufog opened this issue Apr 12, 2019 · 6 comments
Closed

Flex users - problem with authorization #2444

lufog opened this issue Apr 12, 2019 · 6 comments
Assignees

Comments

@lufog
Copy link

lufog commented Apr 12, 2019

If you register a new flex user, and try to log in. You get an error "Login failed...".
This happens both when the user is registered from the site, and when the first user is created from the admin plugin.

# system.yaml
...
accounts:
  type: flex
  storage: file
...

Access rights are correct:

# {profile_hash}.yaml
...
access:
  site:
    login: 'true'
...

or

# {profile_hash}.yaml
...
groups:
  - user
...
# groups.yaml
...
user:
  groupname: user
  readableName: User
  access:
    site:
      login: true
...

If you regenerate an account index file, old accounts also stop logging in.

@lufog
Copy link
Author

lufog commented Apr 20, 2019

Not sure, but maybe this information will be useful.
Exceptions:

Flex: accounts index cache not enabled
E:\Development\Web\site\system\src\Grav\Framework\Flex\FlexDirectory.php#318

Flex: accounts object cache not enabled
E:\Development\Web\site\system\src\Grav\Framework\Flex\FlexDirectory.php#318

@mahagr
Copy link
Member

mahagr commented Apr 24, 2019

Those errors are there just for debugging purposes. Flex users is still an experimental feature and may have some issues depending on the configuration.

@mahagr mahagr added the fixed label Jul 3, 2019
@mahagr
Copy link
Member

mahagr commented Jul 3, 2019

@lufog This one should be fixed in CI build.

@lufog lufog closed this as completed Jul 4, 2019
@lufog
Copy link
Author

lufog commented Sep 2, 2019

The problem is not resolved. When flex is enabled, a new registered user cannot log in.
At the same time, if you rename the account file from 6fe43d2989668fc43d1cf363848c655e.yaml to username.yaml, authorization will work.

versions:
grav: git-branch-1.7 (02.09.19)
admin git-branch-1.10 (02.09.19)

system.yaml:

...
accounts:
  type: flex
  storage: file
...

@lufog lufog reopened this Sep 2, 2019
@lufog
Copy link
Author

lufog commented Sep 4, 2019

@mahagr, please read the previous comment.

@mahagr
Copy link
Member

mahagr commented Sep 17, 2019

@lufog Should be fixed now for the next 1.6 version. Thanks for reporting this issue; Flex users will be more of a thing in Grav 1.7.

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

No branches or pull requests

3 participants