an ASP.NET Open Source CMS & eCommerce platform
Search:
Skip Navigation LinksHome > DotShoppingCart Forums > Support > Using DotShoppingCart > I need to create new roles under admin role and...
Last Post 5/1/2009 9:56:27 PM By lukezy. 25 replies.
Page 1 of 3 (26 posts) << First < Prev 1 2 3 Next > Last >> 
4/30/2009 7:35:27 AM
bansal_db
Posts: 181
Joined: 4/13/2009
I need to create new roles under admin role and assign permissions accordingly
Hi,
 
I need to create an admin who can only access Orders.
One who can only access Products.
 
How would i do that.
 
Thanks
 
4/30/2009 7:55:05 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: I need to create new roles under admin role and assign permissions accordingly
Please take a look at this thread.
DotShoppingCart Staff
4/30/2009 8:08:25 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: I need to create new roles under admin role and assign permissions accordingly
I tried doing the steps from that thread.
I added this in sitemap and added the ProductAdmin role in webconfig for admin
 
<font color="#a31515" size="2"><font color="#a31515" size="2"> <div style="margin: 0in 0in 0pt;"><span style="font-size: 10pt; color: blue;">
</span>
 
When i logged in as the new user, I didn't see the enter site admin tab on the top., I tried accessing the admin pages via url and i was able to access everything for admin. I didn't limit the user to just products.
 
4/30/2009 8:18:15 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: I need to create new roles under admin role and assign permissions accordingly
Did you make any change to Admin\web.config? If so, what's your change?
DotShoppingCart Staff
4/30/2009 8:19:23 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: I need to create new roles under admin role and assign permissions accordingly
<configuration>
    <appSettings/>
    <connectionStrings/>
    <system.web>
        <httpRuntime executionTimeout="120" maxRequestLength="20000"/>
        <authorization>
            <allow roles="Administrator"/>
            <allow roles="ProductAdmin"/>
            <deny users="*"/>
        </authorization>
    </system.web>
</configuration>
4/30/2009 8:29:50 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: I need to create new roles under admin role and assign permissions accordingly
Well, you just allowed all the page access to the role ProductAdmin since you are putting it at the root level.
 
Try adding this.
 

    <location path="Admin/Catalog">

        <system.web>

            <authorization>

                <allow roles="Administrator, ProductAdmin"/>

            </authorization>

        </system.web>

    </location>

 
DotShoppingCart Staff
4/30/2009 8:37:34 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: I need to create new roles under admin role and assign permissions accordingly
I can still access everything.
4/30/2009 9:12:40 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: I need to create new roles under admin role and assign permissions accordingly
Did you remove the allow line "<allow roles="ProductAdmin"/>" at the root levle?
DotShoppingCart Staff
4/30/2009 9:15:06 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: I need to create new roles under admin role and assign permissions accordingly
this is what it looks like now
 
<configuration>
    <appSettings/>
    <connectionStrings/>
    <system.web>
        <httpRuntime executionTimeout="120" maxRequestLength="20000"/>
        <authorization>
            <allow roles="Administrator,ProductAdmin"/>
        <deny users="*"/>
        </authorization>
    </system.web>
</configuration>
4/30/2009 9:25:22 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: I need to create new roles under admin role and assign permissions accordingly
Change <allow roles="Administrator,ProductAdmin"/> to <allow roles="Administrator"/>
 
For more detail, please read this.
DotShoppingCart Staff
4/30/2009 9:35:08 AM
bansal_db
Posts: 181
Joined: 4/13/2009
Re: I need to create new roles under admin role and assign permissions accordingly
I changed the roles to just Administrator. Now i can't access any of the user functions. Not even products.
Page 1 of 3 (26 posts) << First < Prev 1 2 3 Next > Last >>