{"id":368,"date":"2013-02-18T13:59:23","date_gmt":"2013-02-18T13:59:23","guid":{"rendered":"http:\/\/www.h-hennes.fr\/blog\/?p=368"},"modified":"2013-02-18T13:59:23","modified_gmt":"2013-02-18T13:59:23","slug":"subversion-gestion-des-droits-des-utilisateurs-par-dossier","status":"publish","type":"post","link":"https:\/\/www.h-hennes.fr\/blog\/2013\/02\/18\/subversion-gestion-des-droits-des-utilisateurs-par-dossier\/","title":{"rendered":"Subversion : Gestion des droits des utilisateurs par dossier"},"content":{"rendered":"<p>En compl\u00e9ment de mes pr\u00e9c\u00e9dents articles sur l&rsquo;utilisation de subversion sur l&rsquo;h\u00e9bergement mutualis\u00e9 d&rsquo;ovh.<br \/>\nVoici comment g\u00e9rer de mani\u00e8re plus avanc\u00e9e les droits des utilisateurs sur les diff\u00e9rents dossiers de votre svn.<\/p>\n<p>Je pars du principe que les pr\u00e9c\u00e9dentes \u00e9tapes ( <a href=\"https:\/\/www.h-hennes.fr\/blog\/2011\/10\/04\/creation-dun-depot-subversion-chez-ovh\/\" title=\"Installation d'un d\u00e9p\u00f4t svn h\u00e9bergement mutualis\u00e9 ovh\" target=\"_blank\">Installation du d\u00e9pot svn<\/a> et <a href=\"https:\/\/www.h-hennes.fr\/blog\/2012\/01\/22\/utiliser-plusieurs-utilisateurs-avec-un-depot-svn-chez-ovh\/\" title=\"Configurer plusieurs utilisateurs svn mutualis\u00e9 ovh\" target=\"_blank\">configuration des utilisateurs<\/a> ) sont d\u00e9j\u00e0 r\u00e9alis\u00e9es.<\/p>\n<p>A pr\u00e9sent il faut vous connecter \u00e0 votre h\u00e9bergement via ftp.<br \/>\nRendez-vous dans le dossier \u00ab\u00a0svn\/test\/conf\/\u00a0\u00bb (test correspondant au nom de votre projet)<\/p>\n<p>R\u00e9cup\u00e9rer le fichier svnserve.conf pour activer la gestion de authentification.<br \/>\nD\u00e9commenter la\u00a0 ligne anon-access = read<br \/>\nEt remplacer &lsquo;read&rsquo; par &lsquo;none&rsquo;<\/p>\n<p>D\u00e9commentez \u00e9galement la ligne authz-db = authz<\/p>\n<p>Dans mon cas le contenu de mon fichier est actuellement le suivant :<\/p>\n<pre lang='bash'>\r\n### This file controls the configuration of the svnserve daemon, if you\r\n### use it to allow access to this repository.\u00a0 (If you only allow\r\n### access through http: and\/or file: URLs, then this file is\r\n### irrelevant.)\r\n\r\n### Visit http:\/\/subversion.tigris.org\/ for more information.\r\n\r\n[general]\r\n### These options control access to the repository for unauthenticated\r\n### and authenticated users.\u00a0 Valid values are \"write\", \"read\",\r\n### and \"none\".\u00a0 The sample settings below are the defaults.\r\nanon-access = none\r\n# auth-access = write\r\n### The password-db option controls the location of the password\r\n### database file.\u00a0 Unless you specify a path starting with a \/,\r\n### the file's location is relative to the conf directory.\r\n### Uncomment the line below to use the default password file.\r\n# password-db = passwd\r\n### The authz-db option controls the location of the authorization\r\n### rules for path-based access control.\u00a0 Unless you specify a path\r\n### starting with a \/, the file's location is relative to the conf\r\n### directory.\u00a0 If you don't specify an authz-db, no path-based access\r\n### control is done.\r\n### Uncomment the line below to use the default authorization file.\r\nauthz-db = authz\r\n### This option specifies the authentication realm of the repository.\r\n### If two repositories have the same authentication realm, they should\r\n### have the same password database, and vice versa.\u00a0 The default realm\r\n### is repository's uuid.\r\n# realm = My First Repository\r\n<\/pre>\n<p>Enregistrez votre fichier et renvoyez le sur votre h\u00e9bergement<\/p>\n<p>Passons ensuite \u00e0 la configuration des acc\u00e8s en elle-m\u00eame, r\u00e9cup\u00e9rer le fichier \u00ab\u00a0authz\u00a0\u00bb<\/p>\n<p>Cr\u00e9er ensuite les groupes d&rsquo;utilisateurs que vous souhaitez :<br \/>\nDans mon exemple nous souhaitons que le groupe \u00ab\u00a0limited\u00a0\u00bb ai uniquement acc\u00e8s au dossier \/trunk\/dossier1\/<\/p>\n<pre lang='bash'>\r\n[groups]\r\nadmin = herve\r\ndevs = user2,user3,user4\r\nlimited = userlimited\r\n<\/pre>\n<p>Puis nous allons cr\u00e9er les acc\u00e8s par d\u00e9faut :<\/p>\n<pre lang='bash'>\r\n[\/]\r\n@admin = rw\r\n@devs = rw\r\n* =\r\n<\/pre>\n<p>Ensuite nous cr\u00e9\u00e9ons l&rsquo;acc\u00e8s uniquement pour le dossier souhait\u00e9 : \/trunk\/dossier1\/<br \/>\nAttention \u00e0 bien retirer le dernier \u00ab\u00a0\/\u00a0\u00bb<\/p>\n<pre lang='bash'>\r\n[ \/trunk\/dossier1]\r\n@limited = rw\r\n<\/pre>\n<p>Les utilisateurs du groupe \u00ab\u00a0limited\u00a0\u00bb peuvent \u00e0 pr\u00e9sent uniquement acc\u00e8der au dossier \/trunk\/dossier1\/ \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>En compl\u00e9ment de mes pr\u00e9c\u00e9dents articles sur l&rsquo;utilisation de subversion sur l&rsquo;h\u00e9bergement mutualis\u00e9 d&rsquo;ovh. Voici comment g\u00e9rer de mani\u00e8re plus avanc\u00e9e les droits des utilisateurs sur les diff\u00e9rents dossiers de votre svn. Je pars du principe que les pr\u00e9c\u00e9dentes \u00e9tapes ( Installation du d\u00e9pot svn et configuration des utilisateurs ) sont d\u00e9j\u00e0 r\u00e9alis\u00e9es. A pr\u00e9sent [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[6],"tags":[171,172,169,228,227],"class_list":["post-368","post","type-post","status-publish","format-standard","hentry","category-trucs-et-astuces","tag-ovh","tag-subversion","tag-svn","tag-svn-authz","tag-svnserve-conf"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/posts\/368","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/comments?post=368"}],"version-history":[{"count":3,"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/posts\/368\/revisions"}],"predecessor-version":[{"id":371,"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/posts\/368\/revisions\/371"}],"wp:attachment":[{"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/media?parent=368"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/categories?post=368"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.h-hennes.fr\/blog\/wp-json\/wp\/v2\/tags?post=368"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}