none
SharePoint customize page load RRS feed

  • Question

  • I our SharePoint application we have a requirement for users to accept our terms and conditions the first time they log in, and when they do I need to save it. So every time a user log in I have to check did they accept our terms if not redirect to the terms page.

    I thought of doing it using event receivers, but I didn't find any helpful one.

    Your help is really appreciated

    Saturday, May 1, 2010 7:54 AM

Answers

  • Well, you must be having annonymous users enabled in that case and i assume that you are implementing form base authentication.

    So you have yourself written the code of Registration/Authentication. In that case, as soon as user completes the login information, you check his authenticaton. 

    If user is authorized, you have got the user session with complete profile as well as the Accptance property true or false. Now check the property - If false, redirect to Terms and Agreements Page, and if true, redirect to requested page. 

    Thanks,

    Ved

    • Marked as answer by Chengyi Wu Wednesday, May 12, 2010 2:33 AM
    Sunday, May 2, 2010 11:21 AM

All replies

  • You could put one redirection web part on your master page. The code of web part implements the desired logic.

    I believe that you have a page for accepting the terms and agreements. For user entity there exists, True or false property for acceptance.

    So As soon as user hits the URL of any page, in case Acceptance property is false, he is redirected to Terms and Agreements page.

     

     

    Saturday, May 1, 2010 10:23 AM
  • You could put one redirection web part on your master page. The code of web part implements the desired logic.

    I believe that you have a page for accepting the terms and agreements. For user entity there exists, True or false property for acceptance.

    So As soon as user hits the URL of any page, in case Acceptance property is false, he is redirected to Terms and Agreements page.

     

     

    Although your solution will do the job, but checking the users every time a page is accessed is going to slow down my application. I was thinking to add my logic on the time of creating the session just after the authentication is done, any idea how to do that?
    Sunday, May 2, 2010 5:33 AM
  • Well, you must be having annonymous users enabled in that case and i assume that you are implementing form base authentication.

    So you have yourself written the code of Registration/Authentication. In that case, as soon as user completes the login information, you check his authenticaton. 

    If user is authorized, you have got the user session with complete profile as well as the Accptance property true or false. Now check the property - If false, redirect to Terms and Agreements Page, and if true, redirect to requested page. 

    Thanks,

    Ved

    • Marked as answer by Chengyi Wu Wednesday, May 12, 2010 2:33 AM
    Sunday, May 2, 2010 11:21 AM