{"id":86167,"date":"2013-05-14T05:45:22","date_gmt":"2013-05-14T05:45:22","guid":{"rendered":"https:\/\/toolset.com\/?post_type=course-lesson&#038;p=86167"},"modified":"2020-11-16T10:05:50","modified_gmt":"2020-11-16T10:05:50","slug":"access-control-for-custom-fields","status":"publish","type":"course-lesson","link":"https:\/\/toolset.com\/es\/course-lesson\/access-control-for-custom-fields\/","title":{"rendered":"Access Control for Fields"},"content":{"rendered":"\n<p>Here are some examples of why you need access control for user fields:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong><a href=\"https:\/\/toolset.com\/es\/course\/wordpress-membership-sites\/\">A membership site<\/a><\/strong>\u00a0\u2013 the site admin can change user membership levels, each user can see his membership and others cannot.<\/li><li><strong><a href=\"https:\/\/toolset.com\/es\/course\/wordpress-directory-and-classifieds-sites\/\">A listing site<\/a><\/strong>\u00a0\u2013 users need to pay to change listing settings, site admins can edit anything.<\/li><\/ul>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>With Access integration, you can assign privileges to all users of a certain type or to specific users.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Set Access control for field groups<\/h2>\n\n\n\n<p>First, you need to create some Types field groups. With Access, you can control both post <a href=\"https:\/\/toolset.com\/es\/glossary\/custom-fields\/\">custom fields<\/a> (post meta) and user custom fields (user meta). Once you have fields groups and Access plugin installed, go to&nbsp;<strong>Toolset&nbsp;<\/strong>\u2192&nbsp;<strong>Access Control<\/strong>&nbsp;and open the&nbsp;<strong>Types&nbsp;Fields<\/strong>&nbsp;tab. You will see a list of everything under Access control, combining post fields&nbsp;and user fields&nbsp;groups<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"8d9e1feedcb3153f83582a3255980599\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2013\/05\/access-types-fields-tab.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2013\/05\/access-types-fields-tab-500x268.png\" alt=\"Types fields tab\" class=\"wp-image-1686181\"\/><\/a><div class=\"tb-image-caption\"><figcaption>Types fields tab<\/figcaption><\/div><\/figure>\n<\/div>\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Click on the field group for which you want to set access control. Note that post fields&nbsp;and user fields have different sets of permissions.<\/p>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid tb-grid\" data-toolset-blocks-grid=\"9cbc03461b87a40447ddc413b8a01dd9\">\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"3034fbe886c11054e95b46b09d3e4112\">\n<p><strong>Post field group<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"3034fbe886c11054e95b46b09d3e4112\">\n<p><strong>User field group<\/strong><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"b015a77c9a70866380ab4029604da9e7\"><div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"b2a8563dde49fe19660cdfe657a6976a\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2013\/05\/post-fields-access-1.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2013\/05\/post-fields-access-1-500x444.png\" alt=\"\" class=\"wp-image-1686191\"\/><\/a><div class=\"tb-image-caption\"><figcaption>Post field group<\/figcaption><\/div><\/figure>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-toolset-blocks-grid-column tb-grid-column tb-grid-align-top\" data-toolset-blocks-grid-column=\"94c1c13b9ededf1481a0785e4dea8746\"><div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-media aligncenter\" data-toolset-blocks-image=\"e128ff5c2960b1ca0ceb4775632bbdde\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2013\/05\/user-fields-access-2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2013\/05\/user-fields-access-2-500x444.png\" alt=\"\" class=\"wp-image-1686199\"\/><\/a><div class=\"tb-image-caption\"><figcaption>User field group<\/figcaption><\/div><\/figure>\n<\/div><\/div>\n<\/div>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>You can set selective access by checking the different options. You can grant specific privileges to specific users by clicking on the user icon. Please remember that WordPress allows only administrators to access the profiles of other users. Administrators are allowed to do anything in the site, so Access does not include an option to allow users to access other users\u2019 fields. Access settings are for entire groups of fields. If you want to assign different access privileges to different fields, create separate groups for them and set the privileges to these groups.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Edit and Read-Only Field Modes<\/h2>\n\n\n\n<p>When you grant&nbsp;<strong>view<\/strong>&nbsp;privileges but not&nbsp;<strong>modify<\/strong>&nbsp;privilege, fields will display as read-only. In that case, the field group displays all fields as read-only inputs.<\/p>\n","protected":false},"author":4341,"featured_media":1664787,"template":"","related-lesson":[8431],"class_list":["post-86167","course-lesson","type-course-lesson","status-publish","has-post-thumbnail","hentry","related-lesson-access-control"],"_links":{"self":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/86167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson"}],"about":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/types\/course-lesson"}],"author":[{"embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/users\/4341"}],"version-history":[{"count":8,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/86167\/revisions"}],"predecessor-version":[{"id":1708775,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/86167\/revisions\/1708775"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/media\/1664787"}],"wp:attachment":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/media?parent=86167"}],"wp:term":[{"taxonomy":"related-lesson","embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/related-lesson?post=86167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}