Project

General

Profile

Where does Redmine determine if the Repository tab is shown?

Added by Tide _ almost 14 years ago

I am trying to do a modification to Redmine. I need to figure out where to add the last and most important part. I need to find out (been trying for hours) where in the code Redmine is saying "if the user can browse the repository then add the repository tab to the project menu".

I have added a column to the project table that is called public_repo and a check box to project settings to adjust it.
I have also added the following permissions: manage_private_repo, browse_private_repo, view_private_changesets and private_commit_access.

I want to add a check that says if !public_repo then check against my new permissions.

I am doing this so I can have a public project and a more private repo. I still want to have different permissions for my more public projects (the ones with public repos).

I could also just say !public_repo and public project then don't show the Repository tab (may be easier if again I knew where to add this code).

I am not asking for exactly how to do this (although that would be great) I just need to figure out where to start tinkering. There is obviously more to this than this but for my certain situation it will work for what I need.


Replies (7)

RE: Where does Redmine determine if the Repository tab is shown? - Added by Tide _ almost 14 years ago

Here is a patch against Redmine trunk r3625. I am not sure on all my additions but everything seems to be ok up to a point. I just need to tie it all in like I mentioned above.

RE: Where does Redmine determine if the Repository tab is shown? - Added by Tide _ almost 14 years ago

I was thinking. Maybe I should just make a plugin that is essentially the same thing as Repository but called Private Repository. Would this be better? Would this be easier? The user would just activate this module instead of Repositories and it would act like I am intending?

RE: Where does Redmine determine if the Repository tab is shown? - Added by Tide _ almost 14 years ago

Plugin sounds best to me too. However, the Repository part of Redmine is so complex to me I am not sure I can do it. I think I would have more luck trying to copy the regular repository part and make a patch.

Every time I install Redmine I end up at this same spot. I want to have a public forum, issues and wiki but a private repository. I also have projects that I want to be public as well as have a public repository.

The way I see it I need some way to have two sets of repository permissions. This way I can adjust them as needed.

(What would be even better would be if Redmine had global permissions but then had project level permissions that could override the global permissions. An example of this would be how Teamspeak 3 has permissions for the server but hen you can create channel permissions that override the server and even user permissions that override both.)

I am thinking this is above my level at the moment. I guess I will have to want it bad enough to figure it out or someone will team up with me to create this.

RE: Where does Redmine determine if the Repository tab is shown? - Added by Muntek Singh almost 14 years ago

Jake Tanner wrote:

Every time I install Redmine I end up at this same spot. I want to have a public forum, issues and wiki but a private repository.

An easy way to do this is to have all the public stuff public, then create a sub-project that has all the private stuff (or vice-versa)

RE: Where does Redmine determine if the Repository tab is shown? - Added by Tide _ almost 14 years ago

I saw a post on that (at the bottom of your post I linked to above). I am going to go give that a try and see how it goes. Thanks for the suggestion.

    (1-7/7)