Active to Inactive Users and UserRoles

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
A. Consider that the admin sets the Registered role to Inactive. In FormsAuthenticationService, a call is made to the customer.IsRegistered(true) at several places. The true argument makes sure that only active user-roles are checked for. IsRegistered(true) in turn checks whether the user who wants to login is assigned the Registered role or not. Note that it returns true only if the Registered role is active. Now the admin has already set this role to Inactive. A mismatch...

Shall we call IsRegistered() by passing false to it? If yes, shall we do it in every call to IsRegistered()?


B. Consider that users A and B are logged in and at the same time the Admin sets their status to Inactive. How does the app. respond to such an action, I don't know. We need to enforce optimistic concurrency. Does the Nop take care of it?
12 years ago
Could anybody pl. tell why the Active property is there in the CustomerRole, is it really needed?

Any practical scenario why the Admin would like to set a SystemRole like ForumModerator Or a user-defined role, let's say, Catalog Manager to Inactive?

Thx.
12 years ago
This is the bug. Set Register customer role to Inactive and try to Login / Register. The Logout button is not shown; reports: Credentials provided is not correct because it corrupts the admin Customer record in the db.

The reason is stated above: The IsInUserRole() returns true only if the Role, in our case Registered, is active.
12 years ago
Why do you set 'Registered' role and inactive? You shouldn't do it because it's the system role.

cool wrote:
This is the bug...The IsInUserRole() returns true only if the Role, in our case Registered, is active.

It's not the bug. Just set 'onlyActiveCustomerRoles' parameter of 'IsRegistered' or 'IsInCustomerRole' method to 'false' (optional parameter).
12 years ago
a.m. wrote:
Why do you set 'Registered' role and inactive? You shouldn't do it because it's the system role.



You are correct why shall anybody set it to Inactive. But this let me wonder why the Active flag is there in the CustomerRole and the admin given the ability to set it to Inactive. What if she unchecks the active box by mistake ...

In the Manage Customers UI, if I check "all" OR uncheck "all" the customer roles, the Search result is the same i.e. it returns the list of all the users. Secondly, it also returns the Guests users. Is this behavior correct?

Thx.
12 years ago
Yes, it's correct behaviour. Store owners can search users in all roles (even hidden)

Regarding editing system roles. Perhaps, store owners should not be able to edit 'Active' property
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.