Viewing a MOSS 2007 page as another user would see it - without logging in as that user
Asked Answered
S

5

9

In Moss 2007 you have the ability to set the target audience for each individual web part within a page. Is there a way to preview how the page will look to another user without logging in as that user? What I am looking for is a way for someone with full control/design permissions on a site to be able to preview how the site will be displayed to another user. Any suggestions?

I have a few test accounts that our IS department uses to preview pages, however we do not allow non-IS departamental staff to use those accounts. Those staff members only have access to their one account. So, if a user makes changes the target audience on a web part on one of their pages, right now they have no way to preview how the page will look to someone else other than asking someone else to login & watching over their shoulder. I can't give out the account information for the test accounts, nor can I create new test accounts.

Thanks!

Edit: I have the ability to preview. The problem is that other users with full control of a site can't preview the page. Here's a scenarios: In my school division each school has a site. The principal has full control of his school's site. On the landing page, he wants all the school announcements to be visible. However, some should only be visible to teaching staff, while others need to be visible to the students. He uses audience targetting but cannot preview to see at a glance that the targetting is correct. A lot of the users are not computer savy so things need to be as simple as possible. Also, that was just one scenario, there are other scenarios that are not divided by school. There are many users with full control of a site with different requirements - so it's not feasible to create test accounts for all scenarios.

Seamy answered 30/9, 2008 at 16:51 Comment(0)
I
2

Edit: After re-reading the question I released that you want the users to be able to preview a page. I think you will need to look into writing a preview control that uses Impersonation to load the page. Not sure how feasible this is, but surely someone has created a preview feature. Sounds like a pretty common scenario to me.

Old Answer: Could you not fire up a non MS browser such as Firefox, which will prompt for the username and password.

You can then just clear the session cookies to be prompted to log in as someone else.

This is the technique I used for an ASP.Net site that used authentication against the domain in a similar manner to SharePoint.

Illiteracy answered 30/9, 2008 at 22:48 Comment(2)
Little tip to improve readability, put your edit at the end of your answer.Catherine
Also, write coherently; end questions with question marks, etc. I didn't understand much of this answer.Comical
C
3

First I don't think it is possible to have a preview feature if you are using NT security. Maybe it is something you can do with forms authentication but I never used it.

On that subject. I think when you are developing new features or integrating stuff on a MOSS/WSS server you need a little flexibility.

With what I see you have to following things you can do. It is surely more cost effective than developing a custom solution. I assume you are using NT Security.

  • User accounts : Ask your domain administrator to have dedicated user accounts to play with.
  • Virtual Machines : Ask to have some virual machines to be able to play with that server combined with tests accounts
  • Sandboxed environment : Ask your IT dept to create a sandboxed MOSS environment to have to possibility to replicate your actual MOSS environment and create custom user scenarios.
Catherine answered 30/9, 2008 at 22:50 Comment(1)
Thanks for the answer! I am using NT Security. I would love to implement your suggestions for myself. But I don't think they are practical for the other users. Updating their SharePoint sites is a small part of their jobs - they don't have much time to invest in these updates. Simpler is better.Seamy
I
2

Edit: After re-reading the question I released that you want the users to be able to preview a page. I think you will need to look into writing a preview control that uses Impersonation to load the page. Not sure how feasible this is, but surely someone has created a preview feature. Sounds like a pretty common scenario to me.

Old Answer: Could you not fire up a non MS browser such as Firefox, which will prompt for the username and password.

You can then just clear the session cookies to be prompted to log in as someone else.

This is the technique I used for an ASP.Net site that used authentication against the domain in a similar manner to SharePoint.

Illiteracy answered 30/9, 2008 at 22:48 Comment(2)
Little tip to improve readability, put your edit at the end of your answer.Catherine
Also, write coherently; end questions with question marks, etc. I didn't understand much of this answer.Comical
M
2

For previewing target audiences only, the only way to do it is to create a target audience that runs based on a properties in the SSP User Profile Properties.

You can then have a control that allows the editor to change the value stored thier profile, re-compile the profiles and voila (for some description of voila) the user will have change thier audience targetting values to something else.

This would need quite a bit of coding and some thought put into the rules for the audience targetting.

At the end of the day, the most cost effective way is to push back to your infrastructure guys for an account solution that will allow you to have an "reader" account people can use for this function.

Marjorymarjy answered 1/10, 2008 at 0:11 Comment(0)
M
2

Alternatively, you can create a control/webpart that hooks into the audiences for the site and displays the audience membership to the user (maybe from the GetMembership call). This does not preview the site, but it will give your editors a heads up on who is in each audience. Something that will help them get the audiences correct.

We have made a similar webpart for security group membership.

Marjorymarjy answered 1/10, 2008 at 20:38 Comment(0)
A
2

I think there are two approaches you can take:

  1. Do make use of test accounts to preview the pages. You can ease the "pain" to log in as another user by making use of the RUNAS command (http://technet.microsoft.com/en-us/library/bb490994.aspx). So it's possible to just create a shortcut on the desktop that opens a browser making use of another account's credentials. Only that browser instance will work with the test account.
  2. Make a copy (or more copies) of the page that you want to preview, store it in a secured site (so it's only accessible for the principal for example), and tweak the Audience Targetting properties of the web parts on that page/pages.
Adorl answered 8/10, 2008 at 6:38 Comment(1)
Thanks for the tip! On a completely unrealated note - I just saw your comment today. Coincidentally, this morning my boss sent me a video ApprovalRouteSample.wmv - does that ring any bells for you?Seamy

© 2022 - 2024 — McMap. All rights reserved.