SharePoint 2010, Permission Level
Permission
Level
|
Description
|
Default
Permission Included
|
Limited
access
|
Allows
access to shared resources only.
Meant
to be combined with specific permissions to give user access to
lists, document libraries, or other elements without giving
access to the SharePoint site. Cannot be customized or deleted.
|
View
Application Pages, Browse User
Information
|
Read
|
Read-only
access to entire SharePoint site.
|
Limited
access plus: View Items, Open
|
Contribute
|
Create
and edit items in lists and document libraries
|
Read
Plus: Add/Edit/Delete Items, Delete
|
Design
|
Create
lists, document libraries, edit pages
|
Contribute
Plus: Manage Lists, Override
|
Full
Control
|
Full
control of the scoped area All permissions
|
All
permissions
|
1
SharePoint 2010, SP Object Model Hierarchy
In SharePoint 2010, there are Farm, Web Application, Site Collection, Site, List, and Document Libraries. Pretty much same as SharePoint 2007.
As you see diagram below:
- Each SPServer object represents a physical server computer. The ServiceInstances property provides access to the set of individual service instances that run on the individual computer.
- Each SPService object represents a logical service installed in the server farm. Derived types of the SPService class include, for example, objects for Windows services, such as the timer service, search, the database service, etc. and also objects for Web services, such as the basic content publishing Web service which supports the Web applications.
- An SPWebService object provides access to configuration settings for a specific logical service or application. The WebApplications property gets the collection of Web applications that run the service.
- If the service implements the Service Application Framework of SharePoint Foundation, then it can be split into multiple configured farm-scoped instantiations (CFSIs). Each of these provides the functionality of the service but each has its own individual permission and provisioning settings.
- Each instance of a service, or a CFSI, that is running on a specific server is represented by an SPServiceInstance object.
- An SPDatabaseServiceInstance object represents a single instance of a database service running on the database server computer. TheSPDatabaseServiceInstance class derives from the SPServiceInstance class and thus inherits the Service property, which provides access to the service or application that the instance implements. The Databases property gets the collection of content databases used in the service.
- Each SPWebApplication object represents a Web application hosted in an Internet Information Services (IIS) Web site. The SPWebApplication object provides access to credentials and other farm-wide application settings. The Sites property gets the collection of site collections within the Web application, and the ContentDatabases property gets the collection of content databases used in the Web application.
- An SPContentDatabase object inherits from the SPDatabase class and represents a database that contains user data for a Web application. The Sitesproperty gets the collection of site collections for which the content database stores data, and the WebApplication property gets the parent Web application.
- An SPSiteCollection object represents the collection of site collections within the Web application.
- Each SPSite object, despite its singular name, represents a set of logically related SPWeb objects (see below). Such a set is commonly called a "site collection," but SPSite is not a standard Microsoft .NET collection class, in contrast to SPWebCollection. Rather, it has members that can be used to manage the site collection. The AllWebs property provides access to the SPWebCollection object that represents the collection of all Web sites within the site collection, including the top-level site. The SPSite.OpenWeb method of the SPSite class returns a specific Web site.
- Each site collection includes any number of SPWeb objects, and each object has members that can be used to manage a site, including its template and theme, as well as to access files and folders on the site. The Webs property returns an SPWebCollection object that represents all the subsites of a specified site, and the Lists property returns an SPListCollection object that represents all the lists in the site.
- Each SPList object has members that are used to manage the list or access items in the list. The GetItems method can be used to perform queries that return specific items. The Fields property returns an SPFieldCollection object that represents all the fields, or columns, in the list, and the Items property returns an SPListItemCollection object that represents all the items, or rows, in the list.
Name of List Templates: SharePoint 2010
List
Template ID
|
List
Type
|
104
|
Announcements list
|
303
|
Blog Categories list
|
302
|
Blog Comments list
|
301
|
Blog Posts list
|
105
|
Contacts list
|
120
|
Custom grid for a list
|
118
|
Custom Workflow Process
|
130
|
Data Connection library
|
110
|
Data sources
|
108
|
Discussion board
|
101
|
Document library
|
106
|
Events list
|
150
|
Gantt Tasks list
|
100
|
Generic list
|
1100
|
Issue tracking
|
103
|
Links list
|
114
|
List template gallery
|
116
|
Master pages gallery
|
201
|
Meeting Agenda list
|
202
|
Meeting Attendees list
|
204
|
Meeting Decisions list
|
207
|
Meeting Objectives list
|
200
|
Meeting Series list
|
210
|
Meeting text box
|
211
|
Meeting Things To Bring
list
|
212
|
Meeting Workspace Pages
list
|
117
|
No-Code Workflows
|
2002
|
Personal document library
|
109
|
Picture library
|
300
|
Portal Sites list
|
2003
|
Private document library
|
111
|
Site template gallery
|
102
|
Survey
|
107
|
Tasks list
|
112
|
User Information list
|
113
|
Web Part gallery
|
119
|
Wiki Page library
|
140
|
Workflow History
|
109
|
Picture Library
|
115
|
XML Form library
|
Name of the site templates: SharePoint 2010, When Creating a site
When
you create a site on SharPoint 2010, You might need to have Site
Template Names!
Name
of the site templates
Available
site templates
|
Site
Template Names
|
Team
Site
|
STS#0
|
Blank
Site
|
STS#1
|
Document
Workspace
|
STS#2
|
Blog
|
BLOG#0
|
Group
Work Site
|
SGS#0
|
Visio
Process Repository
|
VISPRUS#0
|
Basic
Meeting Workspace
|
MPS#0
|
Blank
Meeting Workspace
|
MPS#1
|
Decision
Meeting Workspace
|
MPS#2
|
Social
Meeting Workspace
|
MPS#3
|
Multipage
Meeting Workspace
|
MPS#4
|
Assets
Web Database
|
ACCSRV#1
|
Charitable
Contributions Web Database
|
ACCSRV#3
|
Contacts
Web Database
|
ACCSRV#41
|
Issues
Web Database
|
ACCSRV#6
|
Projects
Web Database
|
ACCSRV#5
|
Document
Center
|
BDR#0
|
Records
Center
|
OFFILE#1
|
Business
Intelligence Center
|
BICenterSite#0
|
My
Site Host
|
SPSMSITEHOST#0
|
Personalization
Site
|
SPSMSITE#0
|
Enterprise
Search Center
|
SRCHCEN#0
|
Basic
Search Center
|
SRCHCENTERLITE#0
|
FAST
Search Center
|
SRCHCENTERFAST#0
|
Enterprise
Wiki
|
ENTERWIKI#0
|
Publishing
Portal
|
BLANKINTERNETCONTAINER#0
|
Publishing
Site
|
CMSPUBLISHING#0
|
Publishing
Site With Workflow
|
BLANKINTERNET#2
|
By
using that: Here is sample code~
Using(SPSite
site = new SPSite("http://yourisiteURL"))
{
Using(SPWeb
web = site.OpenWeb())
{
Web.AllowUnsafeUpdates
= true;
SPWeb
eWeb = site.AllWebs.Add("your site url", "your site
name", "description", 1033, "STS#0, true,
false);
eWeb.Update();
}
}
Get UserProfile information programmatically using SharePoint 2010 object model?
by Young Ahn 10. May 2011 21:40How to get UserProfile information programmatically using SharePoint 2010 object model?
To
retrieve User Profile information you should have User Profile
Service application configured and activated.
Microsoft.Office.Server.UserProfiles.UserProfileManager dll need to
reference needed.
Code
Sample to retrieve the data:
using
(SPSite site = new SPSite("Site URL"))
{
SPServiceContext
context = SPServiceContext.GetContext(site);
UserProfileManager
upm = new UserProfileManager(context);
UserProfile
profile = upm.GetUserProfile("Domail\\UserName");
String
WorkEmail=profile[PropertyConstants.WorkEmail].Value.ToString();
String
FirstName = profile[PropertyConstants.FirstName].Value.ToString();
String
LastName = profile[PropertyConstants.LastName].Value.ToString();
}
SharePoint 2010, Type Templates
SharePoint Project - Type Templates
Business
Data Connectivity Model
This
template is used to build BCS models that allow you to connect
SharePoint to your line - of - business systems, databases, or web
services. VS includes a graphical designer for BCS models.
Content
Type
Use
this template to create a custom content type. While there is no
graphical designer for content types, VS does support IntelliSense
for creating the XML to define your content type.
Empty
SharePoint Project
This
template allows you to set up an empty project that has all the
necessary elements for you to get started, such as folders for
references, features, solutions, and a key to strong name your
assembly.
Event
Receiver
Use
this template to start writing event receivers. Event receivers can
be on a List, List Item, List Email, Web, or List Workflow event.
VS will create the event receiver class for you, which you can
customize for your application.
Import
SharePoint Solution Package
This
template allows you to import an existing WSP.
Import
Reusable Workflow
This
template allows you to import an existing reusable workflow that
you created in SPD, which you can then customize and deploy from
VS. Note that the import is one way, and once it is modified in VS,
you cannot go back to SPD.
List
Definition
You
can create a list definition and list instance using this template.
You can base your list on the Announcements, Calendar, Contacts,
Custom List, Document Library, Links, or Tasks list types.
Module
A
module type allows you to add additional fi les to your SharePoint
projects. Included are an Elements.xml fi le and a sample.txt fi le
that you can modify to meet your needs or you can add new fi les to
the module.
Sequential
Workflow
This
template creates a new sequential workflow. The workflow can be a
list or site workflow, and you can use the graphical workflow
design tools to create your workflow in VS.
Site
Definition
This
template allows you to create a new site definition. Once it is
created, you will see a number of fi les for this project type,
including a default ASPX page; a onet.xml fi le, which defines the
items in your site; a global resource fi le; local resource fi les;
and a web temp file used to tell SharePoint about your site.
State
Machine Workflow
This
template creates a new state machine workflow. You can use the
graphical workflow design tools in VS to modify your workflow.
Visual
Web Part
This
template creates a new Visual web part, which allows you to drag
and drop controls onto your web part for your user interface rather
than having to write the user interface in code. It contains a web
part and a User Control item.
Application
Page
Use
this template to create an application page, which is just an
ASP.NET page hosted in SharePoint.
Business
Data Connectivity Resource Item
Use
this template to create a resource fi le for your BCS model. A
resource file allows you to localize the names in your model and
apply permissions to objects.
Empty
Element
This
template creates an elements.xml file that allows you to define
SharePoint artifacts using XML. The most common usage would be
defining a field in your SharePoint project.
Global
Resources File
Use
this template to create a resource fi le, which will contain all
the localized text strings for your project.
List
Definition from Content Type
This
template creates a list definition based on a content type in your
project.
List
Instance
This
template creates an instance of a list by generating a new instance
and an elements.xml fi le that describes the properties for the
instance.
User
Control
You
can create a user control that you can use in an application page
or web part with this template. You can design the control using
the graphical designers in VS by dragging and dropping your
controls onto the design surface.
Web
Part
This
template allows you to create a web part for your SharePoint
environment.
Workflow
Association Form
This
template allows you to create a form that is displayed when a
workflow is associated with its intended target, such as a list.
The form will be an ASP.NET form, and the template creates two fi
les, a Designer file and your code - behind fi le. You can use this
form to collect any properties you need from the user for your
workflow to create the workflow instance.
Workflow
Initiation Form
This
template creates a workflow initiation form, which is used when the
workflow is activated. This template creates a Designer and a code
- behind file for your ASPX form.
SharePoint 2010, Sandboxed Solution Limitation
SharePoint 2010, Sandboxed Solution Limitation
When
a sandboxed solution is deployed, the array of SharePoint
functionality available to it is limited to help reduce any
security vulnerabilities it may have. Some of these limitations
include the following:
- Sandboxed solutions have a restricted subset of deployable solution elements available to them. Potentially vulnerable SharePoint project templates, such as site definitions and workflows, are not available.
- SharePoint runs sandboxed solution code in a process (SPUCWorkerProcess.exe) separate from the main IIS application pool (w3wp.exe) process.
- Mapped folders cannot be added to the project.
- Types in the Microsoft SharePoint Server 2010 assembly Microsoft.Office.Server cannot be used in sandboxed solutions. Also, only types in the Microsoft SharePoint Foundation 2010 assembly Microsoft.SharePoint can be used in sandboxed solutions.
It
is important to note that specifying a SharePoint solution as a
sandboxed solution has no affect on SharePoint server; it only
determines how the SharePoint project is deployed to SharePoint
from Visual Studio and what assemblies it binds to. It does not
affect the generated .wsp file, and the .wsp file has no data that
directly correlates to the Sandboxed
Solution property.
Be the first to rate this postSharePoint 2010, Sandboxed solutions Capabilities and elements
Sandboxed
solutions support the following capabilities and elements:
- Content Types/Fields
- Custom actions
- Declarative workflows
- Event receivers
- Feature callouts
- List Definitions
- List Instances
- Module/files
- Navigation
- Onet.xml
- SPItemEventReceiver
- SPListEventReceiver
- SPWebEventReceiver
- Support for all Web Parts that derive fromSystem.Web.UI.WebControls.WebParts.WebPart
- Web Parts
- WebTemplate feature elements (instead of Webtemp.xml)
- Visual Web Parts
Sandboxed
solutions do not support the following capabilities and elements:
- Application Pages
- Custom Action Group
- Farm-scoped features
- HideCustomAction element
- Web Application-scoped features
- Workflows with code
No comments:
Post a Comment