<br />
<b>Deprecated</b>:  YoastSEO_Vendor\Symfony\Component\DependencyInjection\Container::__construct(): Implicitly marking parameter $parameterBag as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/symfony/dependency-injection/Container.php</b> on line <b>60</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\League\OAuth2\Client\Provider\AbstractProvider::authorize(): Implicitly marking parameter $redirectHandler as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/league/oauth2-client/src/Provider/AbstractProvider.php</b> on line <b>416</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\GuzzleHttp\Client::getConfig(): Implicitly marking parameter $option as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/Client.php</b> on line <b>181</b><br />
<br />
<b>Deprecated</b>:  YoastSEO_Vendor\GuzzleHttp\ClientInterface::getConfig(): Implicitly marking parameter $option as nullable is deprecated, the explicit nullable type must be used instead in <b>/home/nubelus/sharedove/adisjugo/wp-content/plugins/wordpress-seo/vendor_prefixed/guzzlehttp/guzzle/src/ClientInterface.php</b> on line <b>77</b><br />
{"id":74,"date":"2008-06-13T16:27:00","date_gmt":"2008-06-13T15:27:00","guid":{"rendered":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2010\/11\/17\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/"},"modified":"2008-06-13T16:27:00","modified_gmt":"2008-06-13T15:27:00","slug":"working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2","status":"publish","type":"post","link":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/","title":{"rendered":"Working with user roles and permissions in SharePoint Object Model &#8211; part 2"},"content":{"rendered":"<p>In my <a href=\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/05\/18\/working-with-user-roles-and-permissions-in-sharepoint-object-model\/\" target=\"_blank\">previous post<\/a>, I have explained how to work with user roles and permissions in SharePoint object model, how to access and create SPGroup objects (SharePoint groups) on the fly, and how to assign Permission Leves (a.k.a Role Definitions) to these SPGroup (or SPUser) objects.<\/p>\n<p>Ok, but, what if existing, predefined Permission levels (Full Control, Design, Manage Hierarchy, Approve, Contribute, Read, Restricted Read, Limited Access, View Only) are not enough?<\/p>\n<p>You can always create your own Premission Level (Role Definition), and specify it&#8217;s rights by using SPBasePermissions enumerator:<\/p>\n<p>  <!--more-->  <\/p>\n<pre class=\"brush: csharp;\">SPRoleDefinition newRole = new SPRoleDefinition();\nnewRole.Name = &quot;Test FB Role Definition&quot;;\nnewRole.Description = &quot;Description of new role definition&quot;;\nnewRole.BasePermissions = \n    SPBasePermissions.ViewListItems |\n    SPBasePermissions.Open |\n    SPBasePermissions.OpenItems;\n\nm_SharePointWeb.RoleDefinitions.Add(newRole);<\/pre>\n<p>By looking at the Permission Levels in our SharePoint site we see then our new Permission Level listed among the other (predefined level).<\/p>\n<p><a href=\"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2010\/11\/image_2.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"image_2\" border=\"0\" alt=\"image_2\" src=\"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2010\/11\/image_2_thumb.png\" width=\"558\" height=\"436\" \/><\/a><\/p>\n<p>&#160;<\/p>\n<p>And, to delete an existing role definition:<\/p>\n<pre class=\"brush: csharp;\">m_SharePointWeb.RoleDefinitions.Delete(&quot;Test FB Role Definition&quot;);<\/pre>\n<p>Asigning this new permission level to a SPGroup would look like:<\/p>\n<pre class=\"brush: csharp;\">SPRoleDefinition groupRoleDefinition = \n    m_SharePointWeb.RoleDefinitions[&quot;Test FB Role Definition&quot;];\n\ngroup2RoleAssigment.RoleDefinitionBindings.Add(groupRoleDefinition);\n\nfolderTest2.Item.RoleAssignments.Add(group2RoleAssigment);<\/pre>\n<div class=\"fb-background-color\">\n\t\t\t  <div \n\t\t\t  \tclass = \"fb-comments\" \n\t\t\t  \tdata-href = \"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/\"\n\t\t\t  \tdata-numposts = \"59\"\n\t\t\t  \tdata-lazy = \"true\"\n\t\t\t\tdata-colorscheme = \"light\"\n\t\t\t\tdata-order-by = \"time\"\n\t\t\t\tdata-mobile=true>\n\t\t\t  <\/div><\/div>\n\t\t  <style>\n\t\t    .fb-background-color {\n\t\t\t\tbackground:  !important;\n\t\t\t}\n\t\t\t.fb_iframe_widget_fluid_desktop iframe {\n\t\t\t    width: 100% !important;\n\t\t\t}\n\t\t  <\/style>\n\t\t  ","protected":false},"excerpt":{"rendered":"<p>In my previous post, I have explained how to work with user roles and permissions in SharePoint object model, how to access and create SPGroup objects (SharePoint groups) on the fly, and how to assign Permission Leves (a.k.a Role Definitions) to these SPGroup (or SPUser) objects. Ok, but, what if existing, predefined Permission levels (Full [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[11],"tags":[54,55],"class_list":["post-74","post","type-post","status-publish","format-standard","hentry","category-development","tag-server-object-model","tag-sharepoint"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Working with user roles and permissions in SharePoint Object Model - part 2 - Adis Jugo blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Working with user roles and permissions in SharePoint Object Model - part 2 - Adis Jugo blog\" \/>\n<meta property=\"og:description\" content=\"In my previous post, I have explained how to work with user roles and permissions in SharePoint object model, how to access and create SPGroup objects (SharePoint groups) on the fly, and how to assign Permission Leves (a.k.a Role Definitions) to these SPGroup (or SPUser) objects. Ok, but, what if existing, predefined Permission levels (Full [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Adis Jugo blog\" \/>\n<meta property=\"article:published_time\" content=\"2008-06-13T15:27:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2010\/11\/image_2_thumb.png\" \/>\n<meta name=\"author\" content=\"adis.jugo\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"adis.jugo\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/\",\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/\",\"name\":\"Working with user roles and permissions in SharePoint Object Model - part 2 - Adis Jugo blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2010\/11\/image_2_thumb.png\",\"datePublished\":\"2008-06-13T15:27:00+00:00\",\"author\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/#primaryimage\",\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2010\/11\/image_2_thumb.png\",\"contentUrl\":\"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2010\/11\/image_2_thumb.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.sharedove.com\/adisjugo\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Working with user roles and permissions in SharePoint Object Model &#8211; part 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#website\",\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/\",\"name\":\"Adis Jugo blog\",\"description\":\"The Southern Side\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.sharedove.com\/adisjugo\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c\",\"name\":\"adis.jugo\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g\",\"caption\":\"adis.jugo\"},\"url\":\"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/author\/adisjugo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Working with user roles and permissions in SharePoint Object Model - part 2 - Adis Jugo blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/","og_locale":"en_US","og_type":"article","og_title":"Working with user roles and permissions in SharePoint Object Model - part 2 - Adis Jugo blog","og_description":"In my previous post, I have explained how to work with user roles and permissions in SharePoint object model, how to access and create SPGroup objects (SharePoint groups) on the fly, and how to assign Permission Leves (a.k.a Role Definitions) to these SPGroup (or SPUser) objects. Ok, but, what if existing, predefined Permission levels (Full [&hellip;]","og_url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/","og_site_name":"Adis Jugo blog","article_published_time":"2008-06-13T15:27:00+00:00","og_image":[{"url":"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2010\/11\/image_2_thumb.png","type":"","width":"","height":""}],"author":"adis.jugo","twitter_card":"summary_large_image","twitter_misc":{"Written by":"adis.jugo","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/","url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/","name":"Working with user roles and permissions in SharePoint Object Model - part 2 - Adis Jugo blog","isPartOf":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/#primaryimage"},"image":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2010\/11\/image_2_thumb.png","datePublished":"2008-06-13T15:27:00+00:00","author":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c"},"breadcrumb":{"@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/#primaryimage","url":"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2010\/11\/image_2_thumb.png","contentUrl":"https:\/\/blog.sharedove.com\/adisjugo\/wp-content\/uploads\/2010\/11\/image_2_thumb.png"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/2008\/06\/13\/working-with-user-roles-and-permissions-in-sharepoint-object-model-part-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.sharedove.com\/adisjugo\/"},{"@type":"ListItem","position":2,"name":"Working with user roles and permissions in SharePoint Object Model &#8211; part 2"}]},{"@type":"WebSite","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#website","url":"https:\/\/blog.sharedove.com\/adisjugo\/","name":"Adis Jugo blog","description":"The Southern Side","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.sharedove.com\/adisjugo\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/a5ca63552094ce9d5a0440f3a1ac9a4c","name":"adis.jugo","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.sharedove.com\/adisjugo\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc5a23cf1bd0b9d8401c9dd65c6c141041ec0c6e37eedbb511779e4a40a198fd?s=96&d=mm&r=g","caption":"adis.jugo"},"url":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/author\/adisjugo\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts\/74","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/comments?post=74"}],"version-history":[{"count":0,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/posts\/74\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/media?parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/categories?post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sharedove.com\/adisjugo\/index.php\/wp-json\/wp\/v2\/tags?post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}