Jump to content

Problem with user permissions


theoretic
 Share

Recommended Posts

Hi guys! And thanks for Processwire!

I got a strange issue concerning user system behavior. Maybe it's a bug in Processwire, maybe i'm missing something.

I'm developing a site having 2 different user templates: the native user template and member template. The alternative user template setup has been done according to official tutorial. What's working fine:

  • "Regular" users can log in and log out as intended
  • Member users also can log in and log out as intended using $session->forceLogin($memberUser) and $session->logout()
  • "Regular" users (all having superuser permissions) can access admin pages and use them
  • Member users have their own set of permissions, they cannot access admin pages

What's buggy:

  • Both $session->forceLogin($memberUser) and $session->logout() have no effect on "regular" user sessions.
  • Logging in/logging out regular users have no effect on member user sessions.
  • Member users can only access their own personal pages with member template, trying to access other member pages gives 404.

The only project-specific thing which could potentially lead to this behavior is the empty password field for any member user. They always log in using $session->forceLogin() and credentials obtained from external API. Tried to assign a password for one of member users; that user could log in/log out using admin page but the above-described bugs were still the same for him.


Have no idea how to fix this, will appreciate any help. Thanks in advance!


P.S. I'm using Processwire 3.0.201 in both dev (Windows)  and test (Linux) environments.

Link to comment
Share on other sites

Just to clarify the situation. It appears that i've run into Firefox memory issues. I have many Firefox tabs and windows opened at the same time, and sometimes it may lead to strange effects concerning sessions and cookies. So it's not a Processwire-related issue. Hope this will be useful for someone.

Link to comment
Share on other sites

  • 8 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...