\r
#### fixes\r
\r
+- Fixed regression in *isFrozen* (issue 181)\r
- Author metrics can be broken by newlines in email addresses from converted repositories (issue 176)\r
- Set subjectAlternativeName on generated SSL cert if CN is an ip address (issue 170)\r
- Fixed incorrect links on history page for files not in the current/active commit (issue 166)\r
\r
#### additions\r
\r
-- Implemented discrete repository permissions (issue 36) \r
+- Implemented discrete repository permissions (issue 36)\r
- V (view in web ui, RSS feeds, download zip)\r
- R (clone)\r
- RW (clone and push)\r
- RWD (clone and push with ref creation, deletion)\r
- RW+ (clone and push with ref creation, deletion, rewind)\r
While not as sophisticated as Gitolite, this does give finer access controls. These permissions fit in cleanly with the existing users.conf and users.properties files. In Gitblit <= 1.1.0, all your existing user accounts have RW+ access. If you are upgrading to 1.2.0, the RW+ access is *preserved* and you will have to lower/adjust accordingly.\r
-- Implemented *case-insensitive* regex repository permission matching (issue 36) \r
+- Implemented *case-insensitive* regex repository permission matching (issue 36)\r
This allows you to specify a permission like `RW:mygroup/.*` to grant push privileges to all repositories within the *mygroup* project/folder.\r
- Added DELETE, CREATE, and NON-FAST-FORWARD ref change logging\r
- Added support for personal repositories.\r
Personal repositories can be created by accounts with the *create* permission and are stored in *git.repositoriesFolder/~username*. Each user with personal repositories will have a user page, something like the GitHub profile page. Personal repositories have all the same features as common repositories, except personal repositories can be renamed by their owner.\r
-- Added support for server-side forking of a repository to a personal repository (issue 137) \r
-In order to fork a repository, the user account must have the *fork* permission **and** the repository must *allow forks*. The clone inherits the access list of its origin. i.e. if Team A has clone access to the origin repository, then by default Team A also has clone access to the fork. This is to facilitate collaboration. The fork owner may change access to the fork and add/remove users/teams, etc as required <u>however</u> it should be noted that all personal forks will be enumerated in the fork network regardless of access view restrictions. If you really must have an invisible fork, the clone it locally, create a new repository for your invisible fork, and push it back to Gitblit. \r
+- Added support for server-side forking of a repository to a personal repository (issue 137)\r
+In order to fork a repository, the user account must have the *fork* permission **and** the repository must *allow forks*. The clone inherits the access list of its origin. i.e. if Team A has clone access to the origin repository, then by default Team A also has clone access to the fork. This is to facilitate collaboration. The fork owner may change access to the fork and add/remove users/teams, etc as required <u>however</u> it should be noted that all personal forks will be enumerated in the fork network regardless of access view restrictions. If you really must have an invisible fork, the clone it locally, create a new repository for your invisible fork, and push it back to Gitblit.\r
**New:** *web.allowForking=true*\r
-- Added optional *create-on-push* support \r
+- Added optional *create-on-push* support\r
**New:** *git.allowCreateOnPush=true*\r
-- Added **experimental** JGit-based garbage collection service. This service is disabled by default. \r
- **New:** *git.allowGarbageCollection=false* \r
- **New:** *git.garbageCollectionHour = 0* \r
- **New:** *git.defaultGarbageCollectionThreshold = 500k* \r
+- Added **experimental** JGit-based garbage collection service. This service is disabled by default.\r
+ **New:** *git.allowGarbageCollection=false*\r
+ **New:** *git.garbageCollectionHour = 0*\r
+ **New:** *git.defaultGarbageCollectionThreshold = 500k*\r
**New:** *git.defaultGarbageCollectionPeriod = 7 days*\r
-- Added support for X509 client certificate authentication (github/kevinanderson1). (issue 106) \r
-You can require all git servlet access be authenticated by a client certificate. You may also specify the OID fingerprint to use for mapping a certificate to a username. It should be noted that the user account MUST already exist in Gitblit for this authentication mechanism to work; this mechanism can not be used to automatically create user accounts from a certificate. \r
- **New:** *git.requireClientCertificates = false* \r
- **New:** *git.enforceCertificateValidity = true* \r
+- Added support for X509 client certificate authentication (github/kevinanderson1). (issue 106)\r
+You can require all git servlet access be authenticated by a client certificate. You may also specify the OID fingerprint to use for mapping a certificate to a username. It should be noted that the user account MUST already exist in Gitblit for this authentication mechanism to work; this mechanism can not be used to automatically create user accounts from a certificate.\r
+ **New:** *git.requireClientCertificates = false*\r
+ **New:** *git.enforceCertificateValidity = true*\r
**New:** *git.certificateUsernameOIDs = CN*\r
- Revised clean install certificate generation to create a Gitblit GO Certificate Authority certificate; an SSL certificate signed by the CA certificate; and to create distinct server key and server trust stores. <u>The store files have been renamed!</u>\r
- Added support for Gitblit GO to require usage of client certificates to access the entire server.\r
-This is extreme and should be considered carefully since it affects every https access. The default is to **want** client certificates. Setting this value to *true* changes that to **need** client certificates. \r
+This is extreme and should be considered carefully since it affects every https access. The default is to **want** client certificates. Setting this value to *true* changes that to **need** client certificates.\r
**New:** *server.requireClientCertificates = false*\r
- Added **Gitblit Certificate Authority**, an x509 PKI management tool for Gitblit GO to encourage use of x509 client certificate authentication.\r
-- Added setting to control length of shortened commit ids \r
+- Added setting to control length of shortened commit ids\r
**New:** *web.shortCommitIdLength=8*\r
-- Added alternate compressed download formats: tar.gz, tar.xz, tar.bzip2 (issue 174) \r
+- Added alternate compressed download formats: tar.gz, tar.xz, tar.bzip2 (issue 174)\r
**New:** *web.compressedDownloads = zip gz*\r
- Added simple project pages. A project is a subfolder off the *git.repositoriesFolder*.\r
- Added support for X-Forwarded-Context for Apache subdomain proxy configurations (issue 135)\r
- Expose ReceivePack to Groovy push hooks (issue 125)\r
- Redirect to summary page when refreshing the empty repository page on a repository that is not empty (issue 129)\r
- Emit a warning in the log file if running on a Tomcat-based servlet container which is unfriendly to %2F forward-slash url encoding AND Gitblit is configured to mount parameters with %2F forward-slash url encoding (Github/jpyeron, issue 126)\r
-- LDAP admin attribute setting is now consistent with LDAP teams setting and admin teams list. \r
+- LDAP admin attribute setting is now consistent with LDAP teams setting and admin teams list.\r
If *realm.ldap.maintainTeams==true* **AND** *realm.ldap.admins* is not empty, then User.canAdmin() is controlled by LDAP administrative team membership. Otherwise, User.canAdmin() is controlled by Gitblit.\r
- Support servlet container authentication for existing UserModels (issue 68)\r
\r
GitBlitSuite.close(git);\r
}\r
\r
+ @Test\r
+ public void testPushToFrozenRepo() throws Exception {\r
+ CloneCommand clone = Git.cloneRepository();\r
+ clone.setURI(MessageFormat.format("{0}/git/test/jgit.git", url));\r
+ clone.setDirectory(jgitFolder);\r
+ clone.setBare(false);\r
+ clone.setCloneAllBranches(true);\r
+ clone.setCredentialsProvider(new UsernamePasswordCredentialsProvider(account, password));\r
+ GitBlitSuite.close(clone.call());\r
+ assertTrue(true);\r
+ \r
+ // freeze repo\r
+ RepositoryModel model = GitBlit.self().getRepositoryModel("test/jgit.git");\r
+ model.isFrozen = true;\r
+ GitBlit.self().updateRepositoryModel(model.name, model, false);\r
+\r
+ Git git = Git.open(jgitFolder);\r
+ File file = new File(jgitFolder, "TODO");\r
+ OutputStreamWriter os = new OutputStreamWriter(new FileOutputStream(file, true), Constants.CHARSET);\r
+ BufferedWriter w = new BufferedWriter(os);\r
+ w.write("// " + new Date().toString() + "\n");\r
+ w.close();\r
+ git.add().addFilepattern(file.getName()).call();\r
+ git.commit().setMessage("test commit").call();\r
+ \r
+ try {\r
+ git.push().setPushAll().call();\r
+ assertTrue(false);\r
+ } catch (Exception e) {\r
+ assertTrue(e.getCause().getMessage().contains("access forbidden"));\r
+ }\r
+ \r
+ // unfreeze repo\r
+ model.isFrozen = false;\r
+ GitBlit.self().updateRepositoryModel(model.name, model, false);\r
+\r
+ git.push().setPushAll().call();\r
+ GitBlitSuite.close(git);\r
+ }\r
+ \r
@Test\r
public void testPushToNonBareRepository() throws Exception {\r
CloneCommand clone = Git.cloneRepository();\r