{"id":4093,"date":"2015-04-09T17:32:56","date_gmt":"2015-04-09T17:32:56","guid":{"rendered":"http:\/\/docs.itthinx.com\/?post_type=document&#038;p=4093"},"modified":"2017-01-27T18:46:28","modified_gmt":"2017-01-27T18:46:28","slug":"tree","status":"publish","type":"document","link":"https:\/\/docs.itthinx.com\/document\/groups-1\/setup\/tree\/","title":{"rendered":"Tree"},"content":{"rendered":"<p>The Tree\u00a0shows the Groups hierarchies.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-6573 aligncenter\" src=\"http:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.07.37.png\" alt=\"groups-tree\" width=\"203\" height=\"165\" srcset=\"https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.07.37.png 406w, https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.07.37-300x244.png 300w\" sizes=\"auto, (max-width: 203px) 100vw, 203px\" \/><\/p>\n<h2 id=\"hierarchy\">Groups hierarchy<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-6583 alignright\" src=\"http:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.31.44.png\" alt=\"create-advanced-group\" width=\"293\" height=\"416\" srcset=\"https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.31.44.png 580w, https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.31.44-212x300.png 212w\" sizes=\"auto, (max-width: 293px) 100vw, 293px\" \/>To restrict access to your posts or pages based on capability inheritance:<\/p>\n<ol>\n<li>Create the desired <strong>Group <\/strong>(child group)<\/li>\n<li>Assign the child group its corresponding capability or capabilities<\/li>\n<li>Select the <strong>Parent<\/strong> Group<\/li>\n<li>The <a href=\"http:\/\/docs.itthinx.com\/document\/groups\/setup\/groups\/#subgroup\" target=\"_blank\">subgroup<\/a>\u00a0inherits the capabilities of its\u00a0parent group.<\/li>\n<\/ol>\n<p>Let&#8217;s assume\u00a0<em>Basic<\/em>\u00a0is the<strong>\u00a0Parent Group<\/strong>\u00a0and\u00a0<em>Advanced<\/em>\u00a0the\u00a0<strong>Child Group<\/strong>,\u00a0a\u00a0subgroup.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-6584 aligncenter\" src=\"http:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.37.12.png\" alt=\"tree-subgroups\" width=\"130\" height=\"61\" \/><\/p>\n<p>In this\u00a0example, there&#8217;re two groups: <em>Basic<\/em> (with the <em>basic<\/em> capability) and <em>Advanced<\/em> (which has the <em>advanced<\/em> capability assigned and inherits the <em>basic<\/em> capability from its parent).<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-6585 aligncenter\" src=\"http:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.39.18.png\" alt=\"capabilities-inheritance\" width=\"1762\" height=\"352\" srcset=\"https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.39.18.png 1762w, https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.39.18-300x60.png 300w, https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.39.18-768x153.png 768w, https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.39.18-1024x205.png 1024w\" sizes=\"auto, (max-width: 1762px) 100vw, 1762px\" \/><\/p>\n<p>As groups inherit the capabilities of their parent groups, the <em>Advanced<\/em> group inherits the capabilities of the\u00a0<em>Basic<\/em> group.<\/p>\n<p>In the below example, Abraham\u00a0belongs to the <em>Advanced <\/em>group and through his membership has permission to access pages protected with the\u00a0<em>advanced<\/em> capability.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-6588\" src=\"http:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.44.13.png\" alt=\"user-groups\" width=\"2182\" height=\"558\" srcset=\"https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.44.13.png 2182w, https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.44.13-300x77.png 300w, https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.44.13-768x196.png 768w, https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.44.13-1024x262.png 1024w\" sizes=\"auto, (max-width: 2182px) 100vw, 2182px\" \/><\/p>\n<p>As the <em>Advanced<\/em> group is a subgroup of <em>Basic<\/em>, Abraham can also access pages protected with the\u00a0<em>basic<\/em> capability.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-6590 aligncenter\" src=\"http:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.47.27.png\" alt=\"user-access\" width=\"630\" height=\"305\" srcset=\"https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.47.27.png 1420w, https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.47.27-300x145.png 300w, https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.47.27-768x372.png 768w, https:\/\/docs.itthinx.com\/wp-content\/uploads\/2015\/04\/Screen-Shot-2016-01-28-at-16.47.27-1024x496.png 1024w\" sizes=\"auto, (max-width: 630px) 100vw, 630px\" \/><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":3893,"menu_order":12,"template":"","document_category":[4],"document_tag":[],"class_list":["post-4093","document","type-document","status-publish","hentry","document_category-groups-1-x"],"_links":{"self":[{"href":"https:\/\/docs.itthinx.com\/wp-json\/wp\/v2\/document\/4093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.itthinx.com\/wp-json\/wp\/v2\/document"}],"about":[{"href":"https:\/\/docs.itthinx.com\/wp-json\/wp\/v2\/types\/document"}],"author":[{"embeddable":true,"href":"https:\/\/docs.itthinx.com\/wp-json\/wp\/v2\/users\/2"}],"version-history":[{"count":36,"href":"https:\/\/docs.itthinx.com\/wp-json\/wp\/v2\/document\/4093\/revisions"}],"predecessor-version":[{"id":7133,"href":"https:\/\/docs.itthinx.com\/wp-json\/wp\/v2\/document\/4093\/revisions\/7133"}],"up":[{"embeddable":true,"href":"https:\/\/docs.itthinx.com\/wp-json\/wp\/v2\/document\/3893"}],"wp:attachment":[{"href":"https:\/\/docs.itthinx.com\/wp-json\/wp\/v2\/media?parent=4093"}],"wp:term":[{"taxonomy":"document_category","embeddable":true,"href":"https:\/\/docs.itthinx.com\/wp-json\/wp\/v2\/document_category?post=4093"},{"taxonomy":"document_tag","embeddable":true,"href":"https:\/\/docs.itthinx.com\/wp-json\/wp\/v2\/document_tag?post=4093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}