Mostrando entradas con la etiqueta Permission. Mostrar todas las entradas
Mostrando entradas con la etiqueta Permission. Mostrar todas las entradas

sábado, 23 de febrero de 2013

Tips Info #8 Sharepoint 2013

1-Web part de Newsfeeds en otro web application diferente de MySite en Sharepoint 2013

image

Este web part pertenece a una feature oculta llamada “My Site Layout Feature”. El ID de esta feature es “”, su ubicación física es TEMPLATE\FEATURES\MySiteLayouts. Para activarla ejecute el siguiente comando, o utilice Sharepoint 2013 Manager

Enable-SPFeature -identity 6928B0E5-5707-46a1-AE16-D6E52522D52B -URL http://url_webApplication

2-Nuevo nivel de permisos en Sharepoint 2013: “Edit”

image

Más info: http://technet.microsoft.com/en-us/library/cc721640(v=office.15)

3-Remover la barra de status que informa sobre un upgrade disponible

image

Si se cierra el mensaje, la barra de status se mostrará en 30 días por default, si quiere cambiar este tiempo, puede ejecutar este comando de powershell

Get-SPWebApplication | % { $_.UpgradeReminderDelay = 90; $_.Update() }

Este comando seteará el recordatorio a 90 días. Recuerde que los administradores del site collection deben cerrar la barra, para que tome la nueva configuración.

En el caso que quieras deshabilitar el upgrade a los administradores del site collection, puede ejecutar lo siguiente:

Get-SPSite -Limit All -CompatibilityLevel 14 | % {
    $_.AllowSelfServiceUpgrade = $false }

image

4-Objeto de javascript _spPageContextInfo

Este objeto ya lo había comentado en el siguiente enlace para Sharepoint 2010. Para Sharepoint 2013 agregaron mayor cantidad de propiedades sobre el mismo.

Nombre Propiedaes

SP2010

SP2013

Valores de ejemplo

currentLanguage

X

X

3082

pageItemId

X

X

4 (Guid de la página)

pageListId

X

X

Guid de la lista

webLanguage

X

X

3082

webServerRelativeUrl

X

X

/

webUIVersion

X

X

15

alertsEnabled

X

X

True

allowSilverlightPrompt

X

X

False

userId

X

X

32

clientServerTimeDelta

 

X

Time

crossDomainPhotosEnabled

 

X

False

currentCultureName

 

X

es-es

currentUICultureName

 

X

es-es

layoutsUrl

 

X

_layouts/15

pagePersonalizationScope

 

X

1

serverRequestPath

 

X

/SitePages/Inicio.aspx

siteAbsoluteUrl

 

X

http://sp_sharepoint

siteClientTag

 

X

0$$15.0.4128.1020

siteServerRelativeUrl

 

X

/

systemUserKey

 

X

1:0).w|contoso\azcon

tenantAppVersion

 

X

0

webAbsoluteUrl

 

X

http://sp_sharepoint

webTemplate

 

X

1

webLogoUrl

 

X

_layouts/15/images/log.png

webPermMasks

 

X

{High:2147483647,Low:4294967295}

webTitle

 

X

Prueba de Contexto

5-Setear paleta de colores y theme vía powershell para Sharepoint 2013

$web = Get-SPWeb http://webapplicationURL/siteCollection/website
$file = $web.GetFile($web.ServerRelativeUrl + "/_catalogs/theme/15/MyTheme.spcolor")
$theme = [Microsoft.SharePoint.Utilities.SPTheme]::Open("MyTheme", $file)
$theme.ApplyTo($web, $false)

Para ver los nombres de los themes pueden ingresar a la siguiente url http://webapplicationURL/siteCollection/website/_catalogs/theme/forms/allitems.aspx

En el caso que quieras aplicar el theme a todos los MySites, ejecuta el siguiente script de powershell:

[Microsoft.SharePoint.SPSecurity]::RunWithElevatedPrivileges({
 
foreach ($site in (Get-SPSite http://urlWebApplicationMySite/* -Limit ALL))
{ ([Microsoft.SharePoint.Utilities.SPTheme]::Open("MyTheme", $site.RootWeb.GetFile($site.RootWeb.ServerRelativeUrl + "/_catalogs/theme/15/MyTheme.spcolor"))).ApplyTo($site.RootWeb, $true) }
})

Para mayor info de themes: http://msdn.microsoft.com/en-us/library/jj927174.aspx

Crear una custom composed look http://tommdaly.wordpress.com/2012/12/19/deploying-a-custom-composed-look-in-sharepoint-2013/

martes, 5 de febrero de 2013

Links útiles #19 Sharepoint 2013

1-Permisos de aplicaciones Sharepoint 2013 (application permissions)

http://msdn.microsoft.com/en-us/library/fp142383.aspx

http://technet.microsoft.com/en-us/library/jj219576.aspx

2-Display Templates Sharepoint 2013

 http://erikswenson.blogspot.co.uk/2013/01/sharepoint-2013-display-templates.html

http://www.learningsharepoint.com/2012/09/17/sharepoint-2013-the-new-display-templates-for-styling-your-content/

http://www.fiechter.eu/blog/Lists/Posts/Post.aspx?ID=29&mobile=0

http://www.elumenotion.com/Blog/Lists/Posts/Post.aspx?ID=156

3-Mejoras en el search de Sharepoint 2013 (improvements search)

http://blogs.technet.com/b/tothesharepoint/archive/2012/12/07/improve-navigation-through-search-results-using-refiners-based-on-custom-entities.aspx

http://blogs.technet.com/b/tothesharepoint/archive/2012/11/26/introducing-search-schema-for-sharepoint-2013.aspx

http://blogs.technet.com/b/tothesharepoint/archive/2012/09/18/what-happened-to-best-bets-introducing-query-rules.aspx

http://blogs.technet.com/b/tothesharepoint/archive/2012/09/14/how-can-i-achieve-the-best-freshness-of-search-results-introducing-continuous-crawls-for-sharepoint.aspx

4- Búsqueda de pdf con Sharepoint 2013 (pdf search)

http://blogs.technet.com/b/tothesharepoint/archive/2012/10/09/build-a-specialized-search-experience-in-minutes-with-sharepoint-2013.aspx

5-Workflows en Sharepoint 2013 (uso de las acciones “Call HTTP Web Services”, “Log to History”, “Build Dictionary”, Get item from Dictionary)

http://www.fiechter.eu/blog/Lists/Posts/Post.aspx?List=7054a141-4635-4cd6-8223-116864700b5f&ID=37&Web=9b2f2e82-a200-4eed-9544-04d48f8a9313

6-Mobile Object de Sharepoint 2013 para Windows Phone 7.5

http://msdn.microsoft.com/en-us/library/jj163797.aspx

7-Search API REST para usuarios anónimos (Anonymous users Seach API REST)

http://blog.mastykarz.nl/configuring-sharepoint-2013-search-rest-api-anonymous-users/

8-Search Schema para Sharepoint 2013

http://blogs.technet.com/b/tothesharepoint/archive/2012/11/26/introducing-search-schema-for-sharepoint-2013.aspx

9-Hosted Web Part Sharepoint 2013

http://digsharepoint.blogspot.com.ar/2013/02/building-sharepoint-hosted-client-web.html

10-Ribbon custom action Sharepoint 2013

http://digsharepoint.blogspot.com.ar/2013/02/how-to-create-sharepoint-ribbon-custom.html

miércoles, 12 de septiembre de 2012

Tips/Info #67 Sharepoint 2010

1-Tamaño de bases de datos de un web application

$DatabeSize = Get-SPContentDatabase -WebApplication "http://Web_applicationURL"
$DatabeSize | Format-Table Name, @{Label="Size"; Expression={$_.DiskSizeRequired / 1073741824}}

2-Redireccionar a una página desde una sandboxed solution

Cómo saben NO se pueden usar Response.Redirect, SPUtility.Redirect, Server.Transfer. Para poder hacer un redireccionamiento podremos hacer lo siguiente:

Literal literalRedirect = new Literal
   {
     Text =
        “<script  language=’javascript’>window.location.href=’/';</script>”
   };
Controls.Add(ltrl);

3-No se muestra de forma correcta el Display Name

En sharepoint se muestra el Display Name como Dominio/UserName, lo cual es erroneo.

Para solucionarlo, se puede usar la sincronización via el User Profile Syncronizacion Service. Otra posibilidad es usar el CMDLet Set-SPUser .

Set-SPUser -Identity ‘Domain\cazcon' -DisplayName ‘Christian Azcon’ –Web http://SharePointServer
Para forzar una sincronización manual de las propiedades del usuario desde el AD, se puede usar la siguiente sentencia:
Set-SPUser -Identity ‘Domain\cazcon' –Web http://SharePointServer –SyncFromAD

Más info: http://technet.microsoft.com/en-us/library/ff607827.aspx

4-Insufficient SQL database permissions for user ‘Name: SID: ImpersonationLevel: Impersonation’ in database ‘SharePoint_Config’ on SQL Server instance ‘’ The EXECUTE permission was denied on the object ‘xxxx’, database ‘SharePoint_Config’, schema ‘dbo’.

Abrir el SQL Managment Studio, ir hasta el store que lanza el error, click derecho y elegi la opción de “Properties”, en la sección de “Permissions” , asigna el permiso de “Execute” al grupo “WSS_Content_Application_Pools”.

5-Borrar logs de auditoría en Sharepoint 2010

Ejecuta SharePoint 2010 Powershell con permisos de administrador
Y ejecuta lo siguiente:
$site = Get-SPSite http://siteCollectionURL
$date = Get-Date “12/09/2012”
#verifica si la fecha es correcta
$date
$site.Audit.TrimAuditLog($date)

sábado, 7 de julio de 2012

Tips/Info #44 Sharepoint

1-Resetear permisos de un site collection mediante powershell

# URL del site collection
$URL = "your_site_collection"
 
# Cargo la consola de SharePoint PowerShell
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
 
# Obtengo el site collection
$siteCollection = Get-SPSite $URL
 
# Enumero los site collection y reseteo permisos para todos los subsites y listas
ForEach ($web in $siteCollection.AllWebs) {
    If ($web.Url -ne $URL) {
        $ws = Get-SPWeb $web.Url      
        $ws.ResetRoleInheritance()
        $ws.Update()
        $ws.Dispose()
    }
    # reseteo las listas del site
    $listas = $web.Lists
    ForEach ($list in $listas) {       
        $list.ResetRoleInheritance()
        $list.Update()
    }
}

2-No se abre los documentos al hacer click sobre los iconos

El origen del problema surge del xslt que renderiza Sharepoint.

1) Ir a donde se definen los XSLT, ubicada normalmente en C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\template\layouts\XSL

2) Hacemos un backup del fldtypes_docicon.xsl

3) Editamos el archivo fldtypes_docicon.xsl con notepad y substituimos el código XML por el que figura en este link: http://support.microsoft.com/default.aspx?scid=kb;en-US;2457975

4) Forzamos un IISRESET  de nuestro servidor

3-Backup&Restore de Listas en Sharepoint 2010 con powershell

Export-SPWeb "http://www.sharepoint.com/" -itemurl "Lists/test" -path "c:\Temp\backup.cmp"
Import-SPWeb "http://www.sharepoint.com/" -Path "c:\Temp\backup.cmp"

4-Teasuros (Thesaurus)

Se ubican en la siguiente ubicación: %ProgramFiles%Microsoft Office Servers14.0DataOffice ServerApplicationsGUID-query-0Config

Ej:

<XML ID="Microsoft Search Thesaurus">
<thesaurus xmlns="x-schema:tsSchema.xml">
<diacritics_sensitive>0</diacritics_sensitive>
<expansion>
<sub>Internet Explorer</sub>
<sub>IE</sub>
<sub>IE8</sub>
</expansion>
<replacement>
<pat>NT5</pat>
<pat>W2K</pat>
<sub>Windows 2000</sub>
</replacement>
</thesaurus>
</XML>



Más info: http://technet.microsoft.com/en-us/library/dd361734.aspx


5-Error:An attempt was made to load an assembly with an incorrect format xxxxx.dll


Tienes que ir a Project Properties –> Build –> y cambiar la opción Generate serialization assembly a OFF.


generate serialization assembly vs 2010

jueves, 31 de mayo de 2012

Tips/info #25 Sharepoint 2010

1-Actualizar los mails de las solicitudes de acceso para todos los sites de un web application mediante powershell

$webapp = Get-SPWebApplication "http://webapplication"
foreach($site in $webapp.Sites)
{
foreach($web in $site.AllWebs)
{
Write-Host $web.url
if(!$web.HasUniquePerm)
{
Write-Host "La solicitud de acceso hereda del elemento padre"
}
else
{
$web.RequestAccessEmail = "emailrequest@emailHost.com"
$web.Update()
Write-Host " Email cambiado"
}
}
}




2-Conducta de comportamiente para abrir documentos : open in the client application


DocShare3


$site=Get-SPSite "http://sitio/"
$web=$site.RootWeb
$docLibrary =$web.Lists["libreria"]
# abre en el cliente
docLibrary.DefaultItemOpen = DefaultItemOpen.PreferClient;
$docLibrary.Update()


Se puede usar:


// Abrir en el navegador
docLibrary.DefaultItemOpen = DefaultItemOpen.Browser;

// usa la configuración default
docLibrary.DefaultItemOpenUseListSetting = false;

3-Error: The web application at [URL] could not be found. Verify that you have typed the url correctly. If the url should be serving existing content, the system administrator may need to add a new request url mapping to the intended application.


Agrega la [url] que menciona el error al alternate access mapping del web application correspondiente.


4-Site collection bloquear su contenido


Para setear un Lock (bloqueo):
stsadm -o setsitelock -url <Site-collection-url> -lock <Lock-Type>


Para verificar los bloqueo actuales:
stsadm -o getsitelock -url <Site-collection-url>


donde<Lock-Type> puede tener los siguientes valores:


  • none  - Remueve todos los bloqueos
  • noadditions  - Previene de agregar contenido
  • readonly – No puede agregar/actualizar/borrar contenido
  • noaccess – No se puede ver el sitio de ninguna manera

    5-Algunas funciones útiles de SPServices


    Columnas de tipo personas o grupo, o columnas de tipo lookup


    Al usar estos campos, la información que se retorna es de la siguiente manera:  110;#4540152 o 16;#Departamento de Sistemas


    Podrás usar la siguiente función:

    function AjustarOWS(value){
    stringValue = value.indexOf(";#");
    salida = value.substring(stringValue +2);
    theLen = salida.length;
    if (theLen < 8){salida = "Not Listed"}else{salida}
    return salida;
    }



    Se podrá usar con SPServices de la siguiente manera:

    var depSistemas = ajustarOWS($(this).attr("ows_DepartamentoSistemas"));

    6-Error al mover o copiar una document set vía programación: DocID: Site prefix not set.

    $site = Get-SPSite http://host/sites/yoursite
    $properties = $site.RootWeb.Properties

    if ($properties["docid_msft_hier_siteprefix"] -eq $null)
    {
    $properties["docid_msft_hier_siteprefix"] = ""
    $properties.Update()
    }
    7-Remover una sección inválida del web.config mediante PowerShell

    $webapplication = Get-SPwebapplicationlication http://url de la web application
    $modification = $webapplication.WebConfigModifications | where { $_.Name -eq "<el nombre de la key" }
    $webapplication.WebConfigModifications.Remove($modification)
    $webapplication.Update()


    8-Error: Object Reference not set to an instance of an object with Timer Job Definitions al tratar de ingresar a http://<CA URL>/_admin/ServiceJobDefinitions.aspx


    El error nos informa en el event viewer:


    “There was an exception loading job definition "Microsoft.Office.Project.Server.Administration.ServerScheduledTimerJob" (id "r3u7f3gd-721b-5dcd-1135-fb3456e39425"). Object reference not set to an instance of an object.”


    abro una consola de powershell y hago lo siguiente:



    • get-sptimerjob | where-object {$_.name -like "PWA*"} | format-list name, id
    • disable-sptimerjob r3u7f3gd-721b-5dcd-1135-fb3456e39425

    9-Comandos de powershell para trabajar con features de Sharepoint


  • #Feature mostrada por nombre alfabeticamente
    Get-SPFeature | Sort -Property DisplayName


    #Feature mostrada por nombre alfabeticamente y agrupada por scope
    Get-SPFeature | Sort -Property Scope,DisplayName | FT -GroupBy Scope DisplayName,Id


    #exportar el resultado
    Get-SPFeature | Sort -Property Scope,DisplayName | FT -GroupBy Scope DisplayName,Id > c:\resultados.txt


    #Features del sitio correspondiente  ordenada por displayname y agrupadas por displayname y ID
    Get-SPFeature -Site http://sitecollectionurl | Sort DisplayName | FT DisplayName,Id


    10-No aparece la opción de “Spell Checker” en la ribbon


    Hay que activar la feature SharePoint Server Publishing Infrastructure a nivel del site collection


    SpellChecker_thumb



    11-Asignar permisos mediante client object


    http://alancejacob.wordpress.com/2012/05/30/programmatically-assign-permission-to-sharepint-list-for-specific-users/


    12-Modificar las columnas created by (creado por) y modified by (modificado por) con Client Object


    http://alancejacob.wordpress.com/2012/05/30/add-listitem-in-created-bymodified-by-field-sharepoint-2010-client-object-model/


    13-Obtener un icono de la carpeta 14 con SPUtility


    http://blogs.msdn.com/b/knackpoint/archive/2012/05/13/fetching-document-file-icons-in-sharepoint.aspx