Subfolder with Role member control - Urgent

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 Jahre weitere
Hi.. it's a bit urgent.

I need to create a subfolder, with Role Member Control, just like "Admin" folder...
To make a Private Blog, for some special clients using the same user database.
The default asp_net.roles table were changed.. fine. But where can I define a role rather than "Admin" now?
I've already tried the normal GUI way... Creating a role in "Customer Roles" and then applying it to the user in "Manage Costumers"... then  informing the role in web.config recently created subfolder. Still with no access.

Any Help?

Thanks!
14 Jahre weitere
Customer roles are stored in cookies. Delete all cookies and try one more time.
14 Jahre weitere
Hi Andrei,
Thank you for replying! Feels nice to talking to you.

Well, I've cleaned up all cookies, reentered website, asked again for the password, automatically logged out this Forum out too... (proof of cookie well cleaned-up)... and no success.
Interesting is: when I just change the web.config file to this:
  
   <authorization>
      <allow roles="Admin"/>
      <deny users="*"/>
    </authorization>

It gives me access Just-In-Time!

When I turn back to what I want, with the role I've created:
  <authorization>
      <allow roles="special"/>
      <deny users="*"/>
    </authorization>

Blocks me off.

When I use this:
 <authorization>
      <allow roles="special, Admin"/>
      <deny users="*"/>
    </authorization>

opens all doors again!

And my user(customer) that is the admin is also in this role "special".
Any sugestions?
14 Jahre weitere
Ok, last attempt... SQL server direct query didn't work!

CREATE ROLE [special] AUTHORIZATION [dbo]

GRANT ALTER,EXECUTE, SELECT,INSERT,UPDATE,DELETE
ON SCHEMA ::dbo
TO special

GRANT BACKUP DATABASE,BACKUP LOG To [special]
EXEC sp_addrolemember N'special', N'[email protected]'

Msg 15410, Level 11, State 1, Procedure sp_addrolemember, Line 75
User or role '[email protected]' does not exist in this database.



Can you dream with that? I can't!
14 Jahre weitere
Hi,

I've noticed that is some problem with the "Nop_CustomerRoleLoadByCustomerID" procedure on SQL Server. Is not returning the roles associated with the Customer. I've ran some tests isolating it... something is missing and I'm too tired to figure out what is it.
Can you help with that? Give a light?

Marcio
14 Jahre weitere
Hi Andrei, are you there?
I really hope you're ok, I hope you didn't die!
14 Jahre weitere
Unfortunately I'm not able to help you because I don't know how to fix it.
P.S. I didn't die =))
14 Jahre weitere
O thank God! :)
You're great!

I'll keep trying bytheway... I was doing something else while I had some answer from you!
Thanks!
14 Jahre weitere
If this is still a problem I think I've found the answer.
The file needed is
Libraries -> nop.BusinessLogic -> Profile -> StoreRoleProvider.cs

The method to edit is
        public override string[] GetRolesForUser(string username)

and the relevent bit is :

            if (customer.IsAdmin)
                return new string[] { "Admin" };

You can add all the customer roles or you can check for certain customer roles using the customer.CustomerRoles collection.

Hope this helps,
Andy
14 Jahre weitere
Yes, It still a problem!
I'll try this now Andy!

thanks in advance!

Marcio
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.