CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.web_parts_and_personalization Tags:
Item Type: NewsGroup Date Entered: 8/3/2007 11:19:49 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 6 Views: 64 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
7 Items, 1 Pages 1 |< << Go >> >|
amittuteja
Asp.Net User
SharePoint Webpart:Getting user information from distribution list8/3/2007 11:19:49 AM

0/0

Hi,

I am developing a custom webpart for sharepoint.I have to show all the links of sites and subsites of which currently logged in user has edit rights.I have been able to do this for users whose name exists in sharepoint people and groups section,but don't know how to do for users who is a part of some DL and we have given access to DL in people and groups section.

My sample code is written below: 

  string UserLogin = System.Web.HttpContext.Current.User.Identity.Name.ToString();
                SPUserCollection allUsers = community.Users;
                foreach (SPUser user in allUsers)
                {
                    if (user.LoginName.ToUpper() == UserLogin.ToUpper())
                    {
                        SPRoleCollection allGroups = user.Roles;

                   
                        foreach (SPRole group in allGroups)
                        {  bool isUserAllowed;


                            isUserAllowed = community.Permissions.DoesUserHavePermissions(SPRights.ViewListItems);
                            if(isUserAllowed.Equals(true))
                            {
                            string strStatus = "User " + UserLogin + " has Reader permissions in /" + community.Title + ".";
                             }
                         
                        }
                }

Nai-Dong Jin -
Asp.Net User
Re: SharePoint Webpart:Getting user information from distribution list8/6/2007 5:50:03 AM

0/0

Hi,

Based on my understanding , do you just want to invite an Existing Distribution List to Your SharePoint Team? Because SharePoint Team Services from Microsoft uses Windows NT authentication to validate any browsers in the Web site, and because e-mail distribution lists are typically not security groups in Microsoft Windows NT, using a distribution list as a group in a SharePoint team Web site requires a minor workaround. See the following link which explains how to perform the workaround.

http://support.microsoft.com/kb/293830/en-us

Thanks.


Sincerely,
Michael Jin.
Microsoft Online Community Support

?Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ?
amittuteja
Asp.Net User
Re: SharePoint Webpart:Getting user information from distribution list8/6/2007 6:51:39 AM

0/0

Hi,

Thanks for reply.But my problem is not of just adding DL to Sharepoint.What i am trying to achieve is show specific things to user depending upon the rights logged in user have,and that user could be a part of some DL as well.SO ijust needs to check if the logged in user have say Edit Rights on some site,then only show that site else do not show it.

Thanks

Amit 

Nai-Dong Jin -
Asp.Net User
Re: SharePoint Webpart:Getting user information from distribution list8/6/2007 7:46:43 AM

0/0

Hi,

Well, you mentioned some of the members who have rights to edit the site is from DL. Then inviting the distribution list into Sharepoint team, setting the corresponding rights, regarding them as the Sharepoint team member, so the authentication mechanism which you use is also suitable for those members from DL.

Thanks.


Sincerely,
Michael Jin.
Microsoft Online Community Support

?Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ?
amittuteja
Asp.Net User
Re: SharePoint Webpart:Getting user information from distribution list8/6/2007 9:32:17 AM

0/0

 Hi,

Yes i hv found a way of knowing weather the user is a normal NT user or DL by using  IsDomainGroup function of SPUser class,but now a new problem has arisen.

The code works only if the user has edit permissions,otherwise in viewer access it does not execute(Unauthorised user) .I ahve read somewhere that sharepoint imposes some security conditions on access of his OOB classes by certain usersConfused,and to overcome the above problem SPSEcurity.CodeToRunElevated has to be used.But when i try to execute my function with elevated permissions it gives admin permissions to the logged in user,that means every user has the edit access.On the contrary i want to get only the users having actual edit permissions.

Don't know how to do it?

 

Amit 

amittuteja
Asp.Net User
Re: SharePoint Webpart:Getting user information from distribution list8/6/2007 9:33:31 AM

0/0

 Hi,

Yes i hv found a way of knowing weather the user is a normal NT user or DL by using  IsDomainGroup function of SPUser class,but now a new problem has arisen.

The code works only if the user has edit permissions,otherwise in viewer access it does not execute(Unauthorised user) .I ahve read somewhere that sharepoint imposes some security conditions on access of his OOB classes by certain usersConfused,and to overcome the above problem SPSEcurity.CodeToRunElevated has to be used.But when i try to execute my function with elevated permissions it gives admin permissions to the logged in user,that means every user has the edit access.On the contrary i want to get only the users having actual edit permissions.

Don't know how to do it?

 

Amit 

khaos
Asp.Net User
Re: SharePoint Webpart:Getting user information from distribution list3/27/2008 8:29:18 PM

0/0

Was this ever resolved?  I am looking for this as well.

 

Thanks,


Joe Johnston
Be sure to mark posts as a solution if they are.

7 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 Authors: Amanda Murphy, Shane Perran, Pages: 552, Published: 2007
Microsoft Office SharePoint Server 2007: The Complete Reference Authors: David Matthew Sterling, David Sterling, Pages: 788, Published: 2007
Essential SharePoint 2007: A Practical Guide for Users, Administrators and Developers Authors: Jeff Webb, Pages: 428, Published: 2007
Microsoft SharePoint Server 2007 Bible Authors: Wynne Leon, Wayne Tynes, Simeon Cathey, Pages: 792, Published: 2007
Beginning Excel Services Authors: Liviu Asnash, Eran Megiddo, Craig Thomas, Pages: 404, Published: 2007

Web:
SharePoint Webpart:Getting user information from distribution list ... SharePoint Webpart:Getting user information from distribution list. Last post 05 -08-2008 4:58 AM by Radon. 8 replies. Sort Posts: ...
SharePoint Web Parts - Group Email With this user information readily available in SharePoint, .... trial version of the Group Email Web Part, but are having some problems getting it to work. ...
SharePoint - webparts User Tasks, Use this webpart to display tasks that are assigned to the ... SharePoint List Filter, Filter the contents of web parts by using a list of ...
MOSS Out of the Box Web Parts - Bobby Habib SharePoint & MOSS ... SharePoint List Filter Filter the contents of web parts by using a list of values from a ... There is no special installation to get OUTLOOK WEB PARTS. ...
Web Parts The User Directory Web Part provides an easy to use, SharePoint-based, self- service directory that allows users to maintain user information in the ...
ECM Lounge: SharePoint 2007 Base webparts & Lists and Library overview SharePoint 2007 Base webparts & Lists and Library overview. Note: This is a list of webparts which you will get when user clicks on "Edit page" > "Add new ...
SharePoint Data View Web Part Announcements List The SharePoint announcement list we have setup currently is receiving e-mail via the distribution list and stores the information in the appropriate columns ...
Ron Charity: SharePoint and WSS 2007 Web Parts You can view the list by simply adding a Web Part to a page and viewing the list from ... Memberships - Displays your site and distribution list memberships ...
Using the Exchange Web Parts Web Parts distributed with Microsoft Office SharePoint Portal Server 2003 can display a user’s Inbox folder, Tasks folder, a list of upcoming appointments ...
SharePoint Server 2007 Help and How-to Any item in a SharePoint list or library can be targeted to specific ... This setting determines whether the Web Part itself is visible to the current user. ...




Search This Site:










iframe behaviour in ie and firefox

error loading module: object reference not set to an instance of an object.

connection

j2ee vs .net

why my pages has write protection

serializing webcontrol properties

design view / code view tabs

identify user - asp.net 2.0

how to set asp.net version in iis?

menu control for child tabs

linq is faster on medium loaded servers than on servers with no load ?

critical speed issues - ssl and dotnetnuke

frames vs. master pages

dpapi machine store - hardware swap outs

microsoft ole db provider for sql server error '80040e4d'

append custom roles to windows or forms authenticated identity

using asp.net to authenticate users based on ad username and redirect to personnal web folder

migrating web site --> web application

dotnetnuke upgrade error

'dbo.getportals' error: could not connect to database

dnn 3.0.8 using vietnamese on page.

has anyone used this block visual studio 2005 beta?

visual studio 2008 express installation problems & frustrations

scroll content of master page such as <frame>

admin components appearing for regular users?

remote development with visual studio

formsauthentication issue with subdomain (ibuyspy starter)

workarounds for opening menu link in new window?

exception management application block - creating custom event log

expanding/collapsing regions and subregions in selected code

 
All Times Are GMT