Tag Info

Hot answers tagged

5

A WebDeleting event can be used to prevent users event if they are owners to delete a site collection. Example: public override void WebDeleting(SPWebEventProperties properties) { properties.Status = SPEventReceiverStatus.CancelWithError; properties.ErrorMessage = "This site cannot be deleted."; properties.Cancel = true; } See this for more ...


3

Those groups will not be able to access the folders if the permission for the folder is broken and only the group "XYZ" has permissions to the folder and rest all are removed. UPDATE Sample powershell code: $folders = $list.Folders foreach ($spFolder in $folders) { $PermissionLevel = "PermissionName" ; $group = $web.SiteGroups[$GroupName]; ...


3

The code is correct and is fine! when accessing aspx pages on the server its not running under app pool account its running under nt authenticated account which should be your own! how do i know? i use aspx on layouts page all the time and giving/dening app pool account access would not effect it! a good expample would be two users.. one site collection ...


3

AFAIK.. Web Parts, User Controls and JSOM either on MasterPage or any page uses the current logged in user credentials until you run the code under RunWithElevatedPrivileges which uses Application Pool identity.. However timer jobs run under SharePoint farm account or simply the user which runs OWSTimer service.


3

Please check MSDN: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsecurity.runwithelevatedprivileges(v=office.14).aspx Executes the specified method with Full Control rights even if the user does not otherwise have Full Control. Parameters secureCode Type: Microsoft.SharePoint.SPSecurity.CodeToRunElevated A delegate method that is to run ...


2

If you are only concerned about what documents users can see in the web part you are making then this is relatively straightforward using the Audience Targeting option in the web part. To do this you would make a web part for each of the different user groups, and for each one input the respective audience in the web part settings. The audience targeting ...


2

It is not a bug.Site Templates does not retain the Security settings.Site templates do not include the following items: Customized permissions, running workflow instances, list item version history, workflow tasks associated with running workflows, people or group field values, taxonomy field values, publishing pages and publishing sites, My Sites, and ...


2

-Web Part: Code executes as the user logged in. Runs in w3wp.exe (worker process) -User Control: Code executes as the user logged in. Runs in w3wp.exe (worker process) -JSOM: Code executes as the user logged in to the workstation (since it's client side). Runs in the browser process. -Timer job: Code executes as the SharePoint Farm Account or simply the ...


2

You need to go to Document Library Ribbon -> Under Library -> Library Settings -> Permissions for this document library OR simply Document Library Ribbon -> Under Library -> Library Permissions By default the document library will be inheriting permissions from Site, you need to click "Stop Inheriting permissions" ribbon button to stop that.. Than you ...


2

You can use export-spweb / import-spweb which by default will not carry over user security settings. Command reference: http://technet.microsoft.com/en-us/library/ff607895(v=office.15).aspx


2

1 should always run under the farm account. For 2, 3, 4, and 5, you should be able to ferret this information out by using this code: SPUser user = SPContext.Current.Web.CurrentUser; string userName = user.Name; //you can also call user.Email here Note that this will not work correctly if you have a 'RunWithElevatedPrivileges' delegate block. Rather, if ...


1

Based on this answer by PirateEric♦, If it's anything like 2007, the membership aspect of My Sites is worthless. In 2007, it required that you explicitly be entered into the Members group in a site/site collection. Anything higher (like owners or designers) you didn't show up. Anything lower (like Visitors) you did not show up. If you were given ...


1

NotVonKaiser in this case is correct: 1 runs under farm account and all others are under logged in user account! The logged in user account will call the nt/authenticated account on the server that he/she has authentication on the server todo what he is requesting todo! if that makes sense ;) think of nt/authenticated as if you are physically logging on ...


1

Yes you can set Item level permissions on Document Library.. Click the context menu/List Item Menu and click Permissions.. Here you can Stop Inheriting Permissions from Library and set unique permissions for the Document.. And once you stop the inheritance of the Document, it will say Item has unique permissions, see below:


1

Other option is to create a HideCustomAction to hide the "Delete a site" action. <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <HideCustomAction Id="Customization" GroupId = "SiteTasks" HideActionId = "DeleteWeb" Location = "Microsoft.SharePoint.SiteSettings"> ...


1

No code shouldn't throw any exceptions.. since user has Read permissions, and I hope the List is also inheriting permissions from site, that means user has Read permissions on List as well.. Thus if you try to add an item in the List, it should throw exception.. Reading / Querying won't throw any exceptions.. UPDATE Actually the other answer seems to be ...


1

SPO does not have Farm Admins (at least not for tenant users). There is a Global Admin, however, that gives a user access to a nerfed version of Central Admin. To determine you are a Global Admin, you can look at the Suite Bar, and if you can see these Admin links, you are a Global Admin.


1

In order for a user to access an application page they must have 'View Application Pages' permission (available in the Read and View Only permission levels). As stated in this link, you can see that application pages are accessed by going to {siteurl}/_layouts/{applicationpage}. The user needs 'View Application Pages' at the site located at {siteurl}. So ...


1

Problem solved. It turns out a previous developer who had developed for us a library provisioning tool for some inexplicable reason decided to set the alloweveryoneviewitems property to true in the code. This meant every library we have provisioned in our system had this value set to true. Easy to fix with powershell script changing the value to false - ...


1

If you've already checked the following my apologies for suggesting it: For the document (or documents) in question, can you verify that they have not had permissions broken off from the library ? If they are in a folder, also check that the folder hasn't had it's permissions broken off. I've seen what you are describing when the document had broken ...


1

Permissions are not included in site templates in SharePoint Server or SharePoint Online. More to read in Reference 1 and Reference 2


1

On premises you can use this: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.speventreceivertype.aspx In Office 365 You can in theory create an app that will handle the administration of those groups for you. However you'd have to hide the original permission management page (master page changes).



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