Multiple repositories and Rails 3
A long waited and so anticipated release of SCM Creator with support of Redmine 1.4.x and 2.0.x is out!
Redmine 1.4.x and Redmine 2.0.x were released quite a long time ago and only now SCM Creator supporting these versions was released! And it is only the first my plugin for 2.0.x...
This release could not, perhaps, come so “early” without the kick of Takashi Okamoto! He assisted me a lot in porting SCM Creator to multiple repositories and Rails 3/Redmine 2. He even created a fork for doing this on Github: https://github.com/okamototk/redmine_scm_creator. Thanks Takashi Okamoto!
Before I planned to release it as 0.3.1. But thanks to Okamoto who suggested 0.4.0 I changed my mind. It’s too much changes for versioning it as 0.3.1. So it is 0.4.0!
So let’s talk about changes:
Support of multiple repositories, which appeared in Redmine 1.4.x, was not a feature for me... it was a headache!
Before there was a single repository and one, who was willing fo have all repositories created, could just set
true. This one could be sure that no one was going to add external repositories. Now this got broken!.. So as a workaround I added only_creator option which allows only creating repositories and denies adding, however SCMs not supported by this plugin should be disabled...
But that was not the main issue! How many repositories can one create?.. So I thought it’s not a good idea to let users creating infinite number of repositories. That’s why I also added max_repos option. This option specifies the limit of repositories which can be created using SCM Creator.
A long time ago Blaž Podržaj discovered an obvious issue which I missed for some reason... When
auto_create was set a user was suggested (or forced) to create a repository on project creation. And it got created despite the value of the “Repository” checkbox under modules list... With this release SCM Creator takes this value into account and won’t create repository if it is not checked! But...
What should those users do who liked this behaviour?.. Before they were getting repository despite of the “Repository” module availability. I can imagine that some users reckon on the old behaviour... So for such users I added force_repository option which just enables “Repository” module and does not let disabling it!
Note that it is still possible to disable the “Repository” module later in project settings! It’s not a bug - it’s current implementation as I want to see what users think about the
force_repository option... And by disabling “Repository” users will just hide it, not remove.
Also all the time in Redmine there was a security issue... Redmine guys name it “invalid configuration issue” and recommend giving the
:repository_manage permission only to users. I don’t agree. You can trust users but can you trust their passwords? Can you trust their Internet connection?.. With multiple repositories this issue became even more noticable so I decided to provide and enforce the solution. This solution uses two new options: allow_add_local and allow_pickup.
falseby default and therefore change default Redmine behavior!
This release of SCM Creator has also a special meaning for my other plugins - having practiced with porting Redmine plugins to Rails 3/Redmine 2, I’m sure, I will port other plugins faster (unless they contain some bugs)...
Also reminding that you can subscribe to news, new versions, commits etc by using Subscription block on the sidebar.
P.S. WikiNG, you come next!