Special temporary rights.

Last post 08-25-2008 12:46 PM by JSmaga. 2 replies.

Sort Posts:

  • Special temporary rights.

    08-25-2008, 11:14 AM
    • Member
      8 point Member
    • JSmaga
    • Member since 07-25-2008, 5:32 AM
    • Geneva
    • Posts 26

    Hi guys,

    I read a lot of tutorials on this website and in some books about security and everything is becoming clear right now but I still have a slight question and I hope you could help me find the answer.

    Let's say I am logged as Player1 using a MemberShipProvider, and say that Player1 is in role "Midfielder".

    Now, I want to allow to allow Player1 to browse the directory "/PenaltyArea/" if and only if he answers some question correctly. Stick out tongue

    How can I do that?

    My guess would be that I manually add Player1 to some role "Striker" and then make sure via the web.config that my folder "/PenaltyArea/" is restricted to "Strikers".

    Then, I would have to remove Player1 from this role everytime he connects (to make sure he has to answer the next question properly in his next connexion).

    Is this approach the right one or do ASP.Net provide some facilities to give temporary rights to a single user that will disappear under certain conditions.

    Hope this was clear,

    Thanks in advance,

    Jeremie

    Jérémie Smaga
    Manchester United Fan
  • Re: Special temporary rights.

    08-25-2008, 11:52 AM
    Answer
    • All-Star
      17,168 point All-Star
    • guru_sarkar
    • Member since 08-31-2007, 12:00 AM
    • Posts 2,608

    Yes dynamically adding/removing user to/from role would be the way.

    Don't know if there is any other.

     

     

  • Re: Special temporary rights.

    08-25-2008, 12:46 PM
    • Member
      8 point Member
    • JSmaga
    • Member since 07-25-2008, 5:32 AM
    • Geneva
    • Posts 26

     Okay thanks,

    I guess we can assume that the user is disconnected and thus should be removed from the role as soon as he explicitely logs out or the session expires. I'll check if there are events handling that.

    Thanks anyway.

    Jérémie Smaga
    Manchester United Fan
Page 1 of 1 (3 items)