Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 9 of 9

Thread: Only Allow Search in Administration Section

  1. #1
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default Only Allow Search in Administration Section

    Hello,

    I created a new customer and gave them admin privileges. It is for our sales associates in our stores. We want them to be able to view ALL product, even if it has a AvailableStopDate. Is there a way, based on their username/email to ONLY allow the search feature and "hide" everything else?

    Thanks!

    ~D

  2. #2
    deanfp is offline Senior Member
    Join Date
    May 2009
    Location
    Sweden
    Posts
    556

    Default

    Try looking at page 2 of this thread. It maybe what you need

    http://forums.aspdotnetstorefront.co...ht=admin+level

  3. #3
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Thank you VERY much, however, I think I am on a different version... perhaps 8 something? Can it be done in there?

  4. #4
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Would it not be better to create a custom xmlpackage that lists all products regardless of start/stop dates - you could also optionally only make it visible to those of the correct customer level.

    Seems better than granting admin access to those you don't really want to have it...


    TTFN

    BFG

  5. #5
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    They typically only need to get in there to look up one SKU. This is a back-of-the-house sort of thing in customer service. And I needed to make a correction... The if statement should go in the if statement where there is a check to see if you are in the AdminSite or not:

    if (AppLogic.IsAdminSite)
    {
    if (Page.ThisCustomer.Notes.Trim().Length != 0 && Page.ThisCustomer.Notes.IndexOf(".xml", StringComparison.InvariantCultureIgnoreCase) != -1)
    {
    MN = Page.ThisCustomer.Notes.Trim();
    }
    }

    And change it to:

    if (AppLogic.IsAdminSite)
    {
    if (Page.ThisCustomer.Notes.Trim().Length != 0 && Page.ThisCustomer.Notes.IndexOf(".xml", StringComparison.InvariantCultureIgnoreCase) != -1)
    {
    MN = Page.ThisCustomer.Notes.Trim();
    }

    if (Page.ThisCustomer.Notes == "no-menu")
    {
    MN = "menuData2.xml";
    }
    }

  6. #6
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    As I understand it though - this doesn't prevent users from actually accessing pages - it just prevents them from seeing the link in the menu.

    e.g. if you go to http://www.yoursite.com/admin/coupons.aspx (when logged in) you'll end up on the coupons page - without going through the menu.


    TTFN

    BFG

  7. #7
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    That is correct. They have no idea how the admin section is setup anyway. They have never been in there before.

  8. #8
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    As long as you are aware & willing to take the risk.
    It wouldn't pass any audit though...


    TTFN

    BFG

  9. #9
    donato is offline Senior Member
    Join Date
    Jun 2009
    Posts
    215

    Default

    Yes. Thank you. This will be fine for now... it is something that will rarely be used.