Tag Info

Hot answers tagged

6

Not sure why you think your appoach is dirty. That's the right use of the SPSecurityTrimmedControl and you should not be afraid to use it that way! In fact, MSDN suggest to use it for resolving issues like yours: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spsecuritytrimmedcontrol.aspx and even more interesting use of it here: ...


4

IfHasRights checks the permissions based on the following permission set: private SPBasePermissions CurrentPermissions() { if (base.wp is DataFormWebPart) { DataFormWebPart wp = base.wp as DataFormWebPart; if (wp.ListItem != null) { return wp.ListItem.EffectiveBasePermissions; } if (wp.SPList != ...


4

The client object model uses the standard SharePoint security and don't allow you to run with elevated priviledges. Who has access to see members of groups are defined at the group and the default is only members can see who are members. You can change this by going to: Site Actions -> Site Settings -> People and groups -> Click the Groups header in ...


4

1.Users can search for SharePoint Items (Documents, Tasks, and Events etc.) Thats a standard functionality. 2.Users can search for SalesForce Items (Chatter Discussions, Documents etc.) You could go with a federated search that would display results in the same way as e.g. Google presents its ads on the right side of the result page. A second way ...


4

You can use set AuthenticationRestrictions="AuthenticatedUsersOnly" Example: <SharePoint:SPSecurityTrimmedControl runat="server" AuthenticationRestrictions="AuthenticatedUsersOnly"> .... </SharePoint:SPSecurityTrimmedControl> Reference: http://sharepoint-community.net/profiles/blogs/hide-elements-in-sharepoint-for-anonymous-users-using


3

Create the links using a "Content Editor Web Part" and assign "Target Audiences" to that web part. So that the links can be targeted to appear only to people who are members of a particular SharePoint group or audience. Reference Links: http://msdn.microsoft.com/en-us/library/ee906649(v=office.14).aspx ...


3

If you have to show/hide parts of the Ribbon based on permissions then SPSecurityTrimmedControl is the ideal way to do it even if you are on SP 2013. You can use ViewListItems permissions to hide the Ribbon from users with Read Only permissions. See this http://msdn.microsoft.com/EN-US/library/ms412690 for all possible types of Permissions which can be used. ...


3

Use the following code: using(SPSite site = new SPSite("http://example/site/")) { using (SPWeb web = site.OpenWeb()) { SPWebCollection webCollection = web.GetSubwebsForCurrentUser(); foreach (SPWeb web in webCollection) { if (web.Properties["SiteCategory"] == "SomeCategory1") {} ...


2

You could do this by editing the master page; find the SharePoint:SiteActions tag,, inside it you will find <SharePoint:MenuItemTemplate runat="server" id="MenuItem_ViewAllSiteContents",, change PermissionsString="" property to: ...


2

Don't give the editor Design pemissions or ensure the permissions being used by that group do not have these options checked.


2

Out of the box, you can manually enter a user/group to see what their level of access is on a library/list. Under The Library/List > Permissions > Check Permissions in the ribbon. From here, you'll enter a username/group. Actually, you can see a full list of everyone's access on the Permissions page.


2

If the links were added in manually, then yes, you'd need to do that. If the navigation is ticked to include subsites, it should security trim them automatically. Hand added URLs do not get removed unless you apply the aduiencing as you mentioned.


2

using code you can do the same thing but you will have to manipulate multiple objects PluggableSecurityTrimmerManager as you know and then CrawlRule using this CrawlRule object, you can do things like SearchAdmin.CrawlRule crawlRule = content.CrawlRules.Create(SearchAdmin.CrawlRuleType.InclusionRule, "yourRulePath"); ...


2

Custom security trimmers can be used for additional trimming, it doesn't replace the OOTB security trimmer. As far as I know you can't replace the OOTB security trimmer.


2

The SharePoint 2010 search index, while crawling, collects and stores the information about access control list (ACL) defined for the files or documents. While searching, this information is being used by the search service to security trim the results and so the search results are displayed according to user permissions. Since WSS 2.0 does not support ...


2

You can download this document Best practices for using fine-grained permissions (SharePoint Products and Technologies): http://www.microsoft.com/en-us/download/details.aspx?id=9030 T.s


2

You could use different scenarios : Apply security on a series of list depending on the AD Group they are in Apply "By Item" security on a single list by adding an event handler by code, and with some logic, apply the good group to the item Adding a column that would be the department, and filter the list by that column Using this solution to edit the ...


2

I just came across this post from Waldek that might be useful for you.


2

In SharePoint 2013 it is not possible to build a security trimmed managed metadata navigation. I hope this feature will coming soon with a Cumulative Update or Service Pack. I am the owner of the german blog wich was mentioned here. I think i will provide my article in english too. Sorry for that!!


2

So you are using a Web Service with the DVWP because you are pulling items from a SharePoint list that exists in a separate site collection? Is the site collection located in the same Farm/Web Application, etc? The security trimming is not related to the DFWP, but the data connection provider you are binding to, and its related ability to impersonate the ...


2

In sharepoint 2013, you have device channels which exactly do the same thing you need. Device Channels is a mechanism that allows you to define a number of channels, map them to devices using user agent matches or custom logic, and associate different Master Pages to each channel. For more details on this check below links: Device Channel in SP 2013 ...


1

What this really sounds like is that some level of caching has been enabled between SharePoint and the Internet itself. You need to make sure that this caching will cache content per user rather than overall. In SharePoint, this is set in the Output Cache options in Site Settings but any other devices in the mix, i.e. (load balancer, edge caching, proxy ...


1

I finally found how to run the core results webpart with elevated privileges, here is the code in case someone else needs it: protected override XPathNavigator GetXPathNavigator(string viewPath) { XmlDocument CustomXml = null; string UserQuery = ""; QueryManager QM = SharedQueryManager.GetInstance(Page, ...


1

Yes, unfortunatelly it is true, maybe we'll get it in 2017 as such. The Managed Metadata based navigation is meant for Global navigation systems, which could cross site collections, not just sites. And so the recomandations are to use it more in a Intranet scenarios where data is purely visible in Read to anyone.


1

Zong, You can turn on the publishing feature... and then you will have Navigation in Site Settings! When you go into Navigation, you can define Audience Targeting on each link, you can manage both Left Navigation and Global Navigation here! I hope this helps


1

The security trimmed control only "trims" based on permissions. The page preview mode runs with the same user and therefore the same permissions so it will make no difference. I solved such an issue by creating a custom control that rendered only if the query string contained PagePreview. You might try something like that.


1

It is not required to know the password in 2010 & 2013 to impersonate the user for search. You can simply do the following: Helper classes: public class WindowsImpersonation : IDisposable { public readonly bool impersonated = false; private WindowsImpersonationContext wic = null; //upn is the user account in the form of user@domain.com ...


1

I found the solution. Impersonating the user the way I did it was not enough. You actually have to log in or get the token of an already logged in user. Example for logging in: IntPtr token = IntPtr.Zero; LogonUser("user@domain", null, "password", LogonSessionType.Network, LogonProvider.Default, out token); var impersonatedIdentity = new ...


1

Yes, Target Audience can be used with SharePoint Groups. If you plan on using AD Groups as well, you'll need to map those groups to SharePoint Groups to fully use the Target Audience functionality.


1

Salman, Under the circumstances below are the following things I can suggest you. Role of Active Directory- Well under any circumstances , users being removed from a SharePoint group has nothing to do with Active Directory. The reason being SharePoint internally maintains user details inside user information list for every site collection. Their ...



Only top voted, non community-wiki answers of a minimum length are eligible