{"id":5,"date":"2015-10-05T00:55:00","date_gmt":"2015-10-05T05:55:00","guid":{"rendered":"http:\/\/www.teamdesk.net\/blog\/2015\/10\/three-approaches-to-record-access-restriction\/"},"modified":"2015-11-11T03:47:42","modified_gmt":"2015-11-11T09:47:42","slug":"three-approaches-to-record-access-restriction","status":"publish","type":"post","link":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/","title":{"rendered":"Three approaches to record access restriction"},"content":{"rendered":"<p>Using an online database, you definitely need to make some data accessible for certain users only while keeping it restricted for others. TeamDesk keeps you in control, providing a powerful role-based access mechanism. <a href=\"http:\/\/www.teamdesk.net\/help\/2.aspx\">Roles<\/a> allow controlling what data users have an access to and which actions they can perform against the database. In this post we describe three main approaches you can utilize for record access adjustment.<\/p>\n<p><strong>1. Simple Access<\/strong><\/p>\n<p>If a default <a href=\"http:\/\/www.teamdesk.net\/help\/3.6.aspx\">table record access<\/a> is not altered, the system allows any record to be added, viewed, modified or deleted by a user. Should any of these actions be restricted, the system provides an easy way to do so on an individual basis. User roles in the database may be configured to precisely control users\u2019 access to any part of the database and to restrict their rights to perform any type of action. You can quickly change any table records access settings and specify either \u201cAllow All\u201d or \u201cNone\u201d option for the correspondent column.<\/p>\n<p><a href=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2015\/10\/11.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2015\/10\/11.gif\" alt=\"1,1\" width=\"793\" height=\"209\" class=\"alignnone size-full wp-image-236\" \/><\/a><\/p>\n<p>Please note that if \u201cNone\u201d option is selected for the \u201cAllow View\u201d action then all other actions become inaccessible. Naturally, a user won\u2019t be able to modify, add or delete records that are invisible to him\/her.<\/p>\n<p>When \u201cOwn Record option\u201d is selected, the system will only allow accessing (viewing or editing) those records where a user is specified as a record owner.<\/p>\n<p><strong>2. Using formulas for record access restriction<\/strong><\/p>\n<p>If a more precise access level adjustment is needed, it can be achieved by adding formulas. A formula can comprise a range of conditions defining the user access. For example, there is a table keeping Comments in your database. Each comment record comprises the Status field with \u201cPrivate\u201d or \u201cPublic\u201d choices. Let\u2019s assume that there are two roles, called \u201cTeam Member\u201d and \u201cPartner\u201d. For instance, Team Member should be able to view all the comments, while Partners should only view comments with \u201cPublic status\u201d. In this case you should select the Custom Rule option in the record access settings and use the following formula [Status]=\u201cPublic\u201d for the Partner role.<\/p>\n<p><a href=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2015\/10\/12.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2015\/10\/12.gif\" alt=\"1,2\" width=\"790\" height=\"288\" class=\"alignnone size-full wp-image-237\" \/><\/a><\/p>\n<p>You may automate formula generation using the Filter option in the <a href=\"http:\/\/www.teamdesk.net\/help\/5.aspx\">View<\/a>. At first, create a View, activate the \u201cOnly records that meet certain criteria\u201d option in the <a href=\"http:\/\/www.teamdesk.net\/help\/5.2.1.aspx\">Filter section<\/a>, indicate necessary criteria and then save this view. Reopen it in the Setup mode and activate the \u201cCustom formula\u201d field. A formula reflecting your criteria will be automatically generated. Simply copy this formula and paste it into the Custom Rule.<\/p>\n<p><strong>3. Record access and user property table<\/strong><\/p>\n<p>If you need to keep some additional information about users (such as salary or a department name), it is handier to keep this data in the special <a href=\"http:\/\/www.teamdesk.net\/help\/2.5.aspx\">User Property Table<\/a> . As a result, you\u2019ll be able to easily extract \u201csalary\u201d or \u201cdepartment\u201d data for any particular user. The \u201cUser Property\u201d table is particularly useful when you need to define access rights, such as &#8220;Allow view records related to the people from my department&#8221;. For example, all sales managers are database users and their profiles are kept in the \u201cUser Property\u201d table, where a Department name is assigned to each sales manager. In a separate table, called \u201cSales\u201d, the \u201cdepartment\u201d value is specified for each record. This allows you to quickly restrict \u201cSales\u201d table records access for any users besides sales managers. For instance, you would need to allow a \u201cview\u201d access to records related to the people from the department assigned in the \u201cUser Property\u201d Table. To adjust their access accordingly, select the \u201cCustom Rule\u201d option and match the \u201cDepartment\u201d column from the Sales table with the \u201cDepartment\u201d column kept in the \u201cUser Property\u201d Table. The formula would be the following: [Department]=User[Department] . Please note that the \u201cDepartment\u201d column which is stored in the \u201cUser Property\u201d table goes with \u201cUser\u201d prefix.<\/p>\n<p><a href=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2015\/10\/13.gif\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2015\/10\/13.gif\" alt=\"1,3\" width=\"840\" height=\"269\" class=\"alignnone size-full wp-image-238\" \/><\/a><\/p>\n<p>Any of the above mentioned access restrictions can be applied to any table. Should you need any help with the records access adjustment, TeamDesk support team is always ready to assist.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using an online database, you definitely need to make some data accessible for certain users only while keeping it restricted for others. TeamDesk keeps you in control, providing a powerful role-based access mechanism. Roles allow controlling what data users have an access to and which actions they can perform against the database. In this post [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-5","post","type-post","status-publish","format-standard","hentry","category-tips-tricks"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Three approaches to record access restriction - TeamDesk 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:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Three approaches to record access restriction - TeamDesk Blog\" \/>\n<meta property=\"og:description\" content=\"Using an online database, you definitely need to make some data accessible for certain users only while keeping it restricted for others. TeamDesk keeps you in control, providing a powerful role-based access mechanism. Roles allow controlling what data users have an access to and which actions they can perform against the database. In this post [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/\" \/>\n<meta property=\"og:site_name\" content=\"TeamDesk Blog\" \/>\n<meta property=\"article:published_time\" content=\"2015-10-05T05:55:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2015-11-11T09:47:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2015\/10\/11.gif\" \/>\n<meta name=\"author\" content=\"Mila\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mila\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/\"},\"author\":{\"name\":\"Mila\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/63bd8646f2f4720f503116e38a190a6e\"},\"headline\":\"Three approaches to record access restriction\",\"datePublished\":\"2015-10-05T05:55:00+00:00\",\"dateModified\":\"2015-11-11T09:47:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/\"},\"wordCount\":671,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/11.gif\",\"articleSection\":[\"Tips &amp; Tricks\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/\",\"name\":\"Three approaches to record access restriction - TeamDesk Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/11.gif\",\"datePublished\":\"2015-10-05T05:55:00+00:00\",\"dateModified\":\"2015-11-11T09:47:42+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/63bd8646f2f4720f503116e38a190a6e\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/11.gif\",\"contentUrl\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/wp-content\\\/uploads\\\/2015\\\/10\\\/11.gif\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/tips-tricks\\\/three-approaches-to-record-access-restriction\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Three approaches to record access restriction\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/\",\"name\":\"TeamDesk Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/#\\\/schema\\\/person\\\/63bd8646f2f4720f503116e38a190a6e\",\"name\":\"Mila\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g\",\"caption\":\"Mila\"},\"url\":\"https:\\\/\\\/www.teamdesk.net\\\/blog\\\/author\\\/mila\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Three approaches to record access restriction - TeamDesk 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:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/","og_locale":"en_US","og_type":"article","og_title":"Three approaches to record access restriction - TeamDesk Blog","og_description":"Using an online database, you definitely need to make some data accessible for certain users only while keeping it restricted for others. TeamDesk keeps you in control, providing a powerful role-based access mechanism. Roles allow controlling what data users have an access to and which actions they can perform against the database. In this post [&hellip;]","og_url":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/","og_site_name":"TeamDesk Blog","article_published_time":"2015-10-05T05:55:00+00:00","article_modified_time":"2015-11-11T09:47:42+00:00","og_image":[{"url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2015\/10\/11.gif","type":"","width":"","height":""}],"author":"Mila","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Mila","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/#article","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/"},"author":{"name":"Mila","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/63bd8646f2f4720f503116e38a190a6e"},"headline":"Three approaches to record access restriction","datePublished":"2015-10-05T05:55:00+00:00","dateModified":"2015-11-11T09:47:42+00:00","mainEntityOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/"},"wordCount":671,"commentCount":0,"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/#primaryimage"},"thumbnailUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2015\/10\/11.gif","articleSection":["Tips &amp; Tricks"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/","url":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/","name":"Three approaches to record access restriction - TeamDesk Blog","isPartOf":{"@id":"https:\/\/www.teamdesk.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/#primaryimage"},"image":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/#primaryimage"},"thumbnailUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2015\/10\/11.gif","datePublished":"2015-10-05T05:55:00+00:00","dateModified":"2015-11-11T09:47:42+00:00","author":{"@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/63bd8646f2f4720f503116e38a190a6e"},"breadcrumb":{"@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/#primaryimage","url":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2015\/10\/11.gif","contentUrl":"https:\/\/www.teamdesk.net\/blog\/wp-content\/uploads\/2015\/10\/11.gif"},{"@type":"BreadcrumbList","@id":"https:\/\/www.teamdesk.net\/blog\/tips-tricks\/three-approaches-to-record-access-restriction\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.teamdesk.net\/blog\/"},{"@type":"ListItem","position":2,"name":"Three approaches to record access restriction"}]},{"@type":"WebSite","@id":"https:\/\/www.teamdesk.net\/blog\/#website","url":"https:\/\/www.teamdesk.net\/blog\/","name":"TeamDesk Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.teamdesk.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.teamdesk.net\/blog\/#\/schema\/person\/63bd8646f2f4720f503116e38a190a6e","name":"Mila","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/939a25c18364af1ceffe1d698a8fd01e1a18d8e1cf906fe3a6ac1cad64bc653f?s=96&d=mm&r=g","caption":"Mila"},"url":"https:\/\/www.teamdesk.net\/blog\/author\/mila\/"}]}},"_links":{"self":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/5","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/comments?post=5"}],"version-history":[{"count":4,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/5\/revisions"}],"predecessor-version":[{"id":570,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/posts\/5\/revisions\/570"}],"wp:attachment":[{"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/media?parent=5"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/categories?post=5"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.teamdesk.net\/blog\/wp-json\/wp\/v2\/tags?post=5"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}