Redmine.pm for Git supporting project-aliases
I’ve been fiddling around to get Redmine.pm handling project-aliases. I finally made it! But if the identifier has been changed, the old identifier needs to be present as an alias!!! Otherwise the SCM directory will be finally unreachable.
However, I’m really NOT familiar with perl/mod_perl. Therefore, usage is on own risk, I cannot guarantee for anything!The attached diff is the diff of my Redmine.pm to the original extra/svn/Redmine.pm as originally delivered by Redmine, including the following patches/modifications:
- Support for Git: “0001-Redmine.pm-update-patch-4905-to-Redmine-1.3.0-fixed.patch” ( Redmine #4905 )
- Minor modification for LDAP-Authentication via the login credentials that shall be authentificated.
- Support for project-alias: Redirects to the “real SCM-directory” if an alias is used or identifier has been changed.
- The sql query retrieves permissions for the project, specified by project-identifier OR project-id corresponding to the alias wihtin table project_aliases.
- Checks if directory named like the project-identifier specified by the URL exists.
- If yes, proceed as usual.
- If not, check if directory named like the real project-identifier retrieved from database exists.
- If yes, redirect to corrected URL.
- If not, check if directory named like any alias exists.
- If yes, redirect to the corrected URL.
- If not, go on. The SCM will announce an error.
- Line 473-475: The location of the repositories should be retrieved from Apache config or environment variables. Any ideas?
- The script should be double checked at all! In my environment it works fully satisfying for me, for others maybe not.