{"id":27255,"date":"2017-01-27T07:08:33","date_gmt":"2017-01-27T15:08:33","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/visualstudioalm\/?p=27255"},"modified":"2019-02-14T15:55:52","modified_gmt":"2019-02-14T23:55:52","slug":"splitting-up-git-administer-permissions","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/splitting-up-git-administer-permissions\/","title":{"rendered":"Splitting up Git administer permissions"},"content":{"rendered":"<p>Like everything in VSTS and TFS, Git repos are protected by a set of <a href=\"https:\/\/www.visualstudio.com\/docs\/setup-admin\/permissions\">permissions<\/a>. For instance, you must have <em>Read<\/em> for a repo\u00a0to clone or view its contents. Likewise, you must have <em>Contribute<\/em> to push changes. Until recently,\u00a0you needed one permission to create, delete, or rename a repo, edit branch policies, or change other people&#8217;s permissions: <em>Administer<\/em>.<\/p>\n<p>We heard from several customers that\u00a0<em>Administer<\/em>\u00a0covered too many scenarios. For instance, at one customer, anyone can create new repos and rename any repo they created. Due to compliance regulations, no one can\u00a0delete a repo they created (only a select group of people have that capability). At another customer, for company policy reasons, separate individuals control branch policies (the repo owner), adding &amp; removing other people&#8217;s permissions (project administrators), and deleting repos (like the previous customer, restricted to only a handful of people).<\/p>\n<p>With\u00a0<em>Administer<\/em> covering all of these capabilities in one permission, both customers were unable to delegate some authority without delegating all authority. In practice, this meant that only a small set of people were responsible for all repo creation and management, creating a bottleneck for engineers every time they wanted a new repo.<\/p>\n<p>You&#8217;ve probably guessed what I&#8217;m going to say next: we&#8217;ve split the <em>Administer<\/em> permission into 6 new permissions. Those new permissions are:<\/p>\n<ol>\n<li>Create repository<\/li>\n<li>Delete repository<\/li>\n<li>Rename repository<\/li>\n<li>Edit policies<\/li>\n<li>Manage permissions<\/li>\n<li>Remove others&#8217; locks<\/li>\n<\/ol>\n<p>We automatically migrate permissions on upgrade (meaning that if you previously had <em>Administer<\/em> on a a repo or at the project level, you now have these 6 new permissions on that repo or project). When you create a new repo, we automatically grant <em>Delete<\/em>, <em>Rename<\/em>, <em>Edit policies<\/em>, <em>Manage permissions<\/em>\u00a0and <em>Remove others&#8217; locks<\/em> on that repo, equivalent to the old behavior of granting\u00a0<em>Administer<\/em>.<\/p>\n<p>We also took this opportunity to clean up the names of a few existing permissions. Several of them were awkwardly phrased. &#8220;Force push&#8221; is a well-understood Git concept, so we promoted it to the front of its corresponding permission name. Mapping from old name to new, the renamed permissions are:<\/p>\n<ul>\n<li>Branch creation \u2192\u00a0<em>Create branch<\/em><\/li>\n<li>Note management \u2192 <em>Manage notes<\/em><\/li>\n<li>Rewrite and destroy history (force push)\u00a0\u2192 <em>Force push (rewrite history and delete branches)<\/em><\/li>\n<li>Tag management\u00a0\u2192 <em>Manage tags<\/em><\/li>\n<\/ul>\n<p>These changes apply to VSTS effective with the current sprint&#8217;s release (rolling out now) and will come to TFS 2017 in Update 1. You&#8217;ll know the change has landed in your account when you go to Version Control permissions and see the new permissions:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/permissions.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-27655\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2017\/01\/permissions.png\" alt=\"New repo permissions\" width=\"384\" height=\"429\" \/><\/a><\/p>\n<p>Small caveat: Until Update 1 releases, users who set permissions using the command-line <code>tf.exe git permissions<\/code>\u00a0tool will not be able to grant or revoke the new permissions against a VSTS account.\u00a0The workaround in the short term is to set permissions with\u00a0<code>TFSSecurity.exe<\/code>\u00a0or the admin tab in the web experience.<\/p>\n<p>It&#8217;s now pretty easy to let anyone create a new repo in your project without giving them full administrative control. Grant the Contributors group &#8220;Create repository&#8221; and you&#8217;re all set.<\/p>\n<p><em>Edit: Removed a reference to &#8220;M112&#8221;. It means &#8220;the sprint we\u00a0recently finished and are starting to deploy now&#8221;, so that&#8217;s what I said instead \ud83d\ude42 Also, added a picture showing what the new permissions will look like in your account.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Like everything in VSTS and TFS, Git repos are protected by a set of permissions. For instance, you must have Read for a repo\u00a0to clone or view its contents. Likewise, you must have Contribute to push changes. Until recently,\u00a0you needed one permission to create, delete, or rename a repo, edit branch policies, or change other [&hellip;]<\/p>\n","protected":false},"author":719,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[228,1,225],"tags":[],"class_list":["post-27255","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-admin-licensing","category-devops","category-git"],"acf":[],"blog_post_summary":"<p>Like everything in VSTS and TFS, Git repos are protected by a set of permissions. For instance, you must have Read for a repo\u00a0to clone or view its contents. Likewise, you must have Contribute to push changes. Until recently,\u00a0you needed one permission to create, delete, or rename a repo, edit branch policies, or change other [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/27255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/719"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=27255"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/27255\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=27255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=27255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=27255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}