public void ShouldCreateSNVAuthorizationFile() { using (var svnAuthorization = new SVNAuthorization(@"C:\CodeGarten\svn\etc\svn_acl")) { svnAuthorization.CreateGroup("GrupoDosFortes", new String[] {"CodeGarten", "FaustinoLeiras", "SamirHafez"}); svnAuthorization.CreateGroup("GrupoDosFracos", new String[] {"ZeTestes"}); svnAuthorization.AddAllPermissionsToRepository("repository2", SVNPrivileges.r); svnAuthorization.AddUserPermissionsToRepository("repository1", "Albertina", SVNPrivileges.r); svnAuthorization.AddGroupPermissionsToRepository("repository1", "GrupoDosFortes", SVNPrivileges.rw); svnAuthorization.AddGroupPermissionsToRepository("repository2", "GrupoDosFracos", SVNPrivileges.rw); } }
// Event args need to be change // make timespan to rewrite the file private void OnUserEnroll(object sender, EventArgs e) { using (var dataBaseManager = new DataBaseManager()) { var filePath = Path.Combine(_filesPath, String.Format("~{0}.tmp", _authFileName)); var svnAuthorization = new SVNAuthorization(filePath); dataBaseManager.Authorization.CreateServiceAuthorizationStruct(svnAuthorization, Name); OverrideFile(filePath, Path.Combine(_filesPath, _authFileName)); } }