{"id":1462,"date":"2012-09-04T11:04:04","date_gmt":"2012-09-04T09:04:04","guid":{"rendered":"http:\/\/www.itidea.nl\/?p=1462"},"modified":"2012-08-30T12:43:05","modified_gmt":"2012-08-30T10:43:05","slug":"office-365-enterprise-preview-permissions-on-list-type-in-an-app","status":"publish","type":"post","link":"https:\/\/www.itidea.nl\/index.php\/office-365-enterprise-preview-permissions-on-list-type-in-an-app\/","title":{"rendered":"Office 365 Enterprise Preview &#8211; Permissions on list type in an app"},"content":{"rendered":"<p>When developing an app for SharePoint permissions can be set on items in the host web, such as access to lists. The host web is the website to which an app for SharePoint is installed.<\/p>\n<p>An app for SharePoint has its own identity and is associated with a security principal, called an app principal. Like users and groups, an app principal has certain permissions and rights. The app principal has full control rights to the app web so it only needs to request permissions to SharePoint resources in the host web or other locations outside the app web.<\/p>\n<p>Using Microsoft Napa Office 365 Developer Tools these permissions can be set in the properties of the app using some kind of slider.<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/01-SP2013-Permissions-Slider.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1475\" title=\"01 SP2013 Permissions Slider\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/01-SP2013-Permissions-Slider.png\" alt=\"\" width=\"577\" height=\"222\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/01-SP2013-Permissions-Slider.png 577w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/01-SP2013-Permissions-Slider-300x115.png 300w\" sizes=\"auto, (max-width: 577px) 100vw, 577px\" \/><\/a><\/p>\n<p>After installing the app this is the result:<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/02-SP2013-Permissions-Trust-Napa-app.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1474\" title=\"02 SP2013 Permissions Trust Napa app\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/02-SP2013-Permissions-Trust-Napa-app.png\" alt=\"\" width=\"536\" height=\"276\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/02-SP2013-Permissions-Trust-Napa-app.png 536w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/02-SP2013-Permissions-Trust-Napa-app-300x154.png 300w\" sizes=\"auto, (max-width: 536px) 100vw, 536px\" \/><\/a><\/p>\n<p>The user can select one list out of all available lists the user has access to.<\/p>\n<p>A better approach would be to help the user pick a specific (kind of) list, not letting the user pick from all lists in the web. This can be accomplished by editing the AppManifest in Visual Studio through a nice looking designer:<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/03-SP2013-Permissions-AppManifest-designer.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1473\" title=\"03 SP2013 Permissions AppManifest designer\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/03-SP2013-Permissions-AppManifest-designer.png\" alt=\"\" width=\"586\" height=\"481\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/03-SP2013-Permissions-AppManifest-designer.png 732w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/03-SP2013-Permissions-AppManifest-designer-300x246.png 300w\" sizes=\"auto, (max-width: 586px) 100vw, 586px\" \/><\/a><\/p>\n<p>At the <em>Permission requests<\/em> section the column <em>Properties<\/em> a BaseTemplateId can be filled in to filter the lists the user can choose from. The BaseTemplateId is the numerical equivalent of the list base template, for example 100 represents a generic list, 101 a document library.<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/04-SP2013-Permissions-AppManifest-BaseTemplateId.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1472\" title=\"04 SP2013 Permissions AppManifest BaseTemplateId\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/04-SP2013-Permissions-AppManifest-BaseTemplateId.png\" alt=\"\" width=\"713\" height=\"118\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/04-SP2013-Permissions-AppManifest-BaseTemplateId.png 713w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/04-SP2013-Permissions-AppManifest-BaseTemplateId-300x49.png 300w\" sizes=\"auto, (max-width: 713px) 100vw, 713px\" \/><\/a><\/p>\n<p>In xml this looks like:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\u00a0 &lt;AppPermissionRequests&gt;\r\n\u00a0\u00a0\u00a0 &lt;AppPermissionRequest Scope=&quot;http:\/\/sharepoint\/content\/sitecollection\/web\/list&quot; Right=&quot;Read&quot; &gt;\r\n\u00a0\u00a0\u00a0\u00a0\u00a0 &lt;Property Name=&quot;BaseTemplateId&quot; Value=&quot;101&quot; \/&gt;\r\n\u00a0\u00a0\u00a0 &lt;\/AppPermissionRequest&gt;\r\n\u00a0 &lt;\/AppPermissionRequests&gt;\r\n<\/pre>\n<p>This results in the following list:<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/05-SP2013-Permissions-Trust-VS-app.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1471\" title=\"05 SP2013 Permissions Trust VS app\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/05-SP2013-Permissions-Trust-VS-app.png\" alt=\"\" width=\"367\" height=\"146\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/05-SP2013-Permissions-Trust-VS-app.png 367w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/05-SP2013-Permissions-Trust-VS-app-300x119.png 300w\" sizes=\"auto, (max-width: 367px) 100vw, 367px\" \/><\/a><\/p>\n<p>It looks like multiple properties can be defined, and you can:<\/p>\n<p>but an additional BaseTemplateId won\u2019t recognized and the filter of list types isn\u2019t amended to the property settings.<\/p>\n<p>You aren\u2019t able to add another List scoped permission request in the designer, other scoped items can be added, also once per AppManifest.<\/p>\n<p>The xml can be amended with another List scoped permission request, but only the first one defined is active.<\/p>\n<p>One gotcha: Once the app is installed and permissions link is selected there is no possibility to view the list its current permission setting. The first list in the dropdown is selected&#8230;<\/p>\n<p>For example Trust library Site Assets:<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/07-SP2013-Permissions-Trust-Site-Assets-library.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1469\" title=\"07 SP2013 Permissions Trust Site Assets library\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/07-SP2013-Permissions-Trust-Site-Assets-library.png\" alt=\"\" width=\"531\" height=\"257\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/07-SP2013-Permissions-Trust-Site-Assets-library.png 531w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/07-SP2013-Permissions-Trust-Site-Assets-library-300x145.png 300w\" sizes=\"auto, (max-width: 531px) 100vw, 531px\" \/><\/a><\/p>\n<p>Request permissions of the app:<br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/08-SP2013-Permissions-link.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1468\" title=\"08 SP2013 Permissions link\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/08-SP2013-Permissions-link.png\" alt=\"\" width=\"388\" height=\"272\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/08-SP2013-Permissions-link.png 388w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/08-SP2013-Permissions-link-300x210.png 300w\" sizes=\"auto, (max-width: 388px) 100vw, 388px\" \/><\/a><br \/>\n<a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/09-SP2013-Permissions-library-selected1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1467\" title=\"09 SP2013 Permissions library selected\" src=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/09-SP2013-Permissions-library-selected1.png\" alt=\"\" width=\"649\" height=\"252\" srcset=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/09-SP2013-Permissions-library-selected1.png 649w, https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/09-SP2013-Permissions-library-selected1-300x116.png 300w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\" \/><\/a><a href=\"https:\/\/www.itidea.nl\/wp-content\/uploads\/2012\/08\/09-SP2013-Permissions-library-selected.png\"><\/a><\/p>\n<p>And the first library is selected&#8230; hope Microsoft is going to fix this one\u2026<\/p>\n<p><span style=\"color: #ff0000;\">Disclaimer: SharePoint 2013 is in preview at time of this writing, so things may change between now and release date.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When developing an app for SharePoint permissions can be set on items in the host web, such as access to lists. The host web is the website to which an app for SharePoint is installed. An app for SharePoint has &#8230; <a class=\"more-link\" href=\"https:\/\/www.itidea.nl\/index.php\/office-365-enterprise-preview-permissions-on-list-type-in-an-app\/\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,35],"tags":[44],"class_list":["post-1462","post","type-post","status-publish","format-standard","hentry","category-sharepoint-2010","category-sharepoint-2013","tag-sharepoint-2013"],"_links":{"self":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/1462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/comments?post=1462"}],"version-history":[{"count":9,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/1462\/revisions"}],"predecessor-version":[{"id":1481,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/posts\/1462\/revisions\/1481"}],"wp:attachment":[{"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/media?parent=1462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/categories?post=1462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itidea.nl\/index.php\/wp-json\/wp\/v2\/tags?post=1462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}