Skip to content

Protected branches not working anymore #734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Alwaysin opened this issue Sep 5, 2019 · 1 comment
Closed

Protected branches not working anymore #734

Alwaysin opened this issue Sep 5, 2019 · 1 comment

Comments

@Alwaysin
Copy link

Alwaysin commented Sep 5, 2019

Since merging of 4.0 changes, it looks like protected branches are not working anymore.

When going to a webpage for example https://redmine.example.com/repositories/222/protected_branches, it gives me an "internal error" and log is as follows:

Started GET "/repositories/222/protected_branches" for <ip> at 2019-09-05 14:29:36 +0200
Processing by RepositoryProtectedBranchesController#index as HTML
  Parameters: {"repository_id"=>"222"}
  Current user: redacted (id=65)
  Rendering plugins/redmine_git_hosting/app/views/repository_protected_branches/index.html.slim
  Rendered plugins/redmine_git_hosting/app/views/repository_protected_branches/index.html.slim (113.2ms)
Completed 500 Internal Server Error in 129ms (ActiveRecord: 6.5ms)

ActionView::Template::Error (undefined local variable or method `protected_branch' for #<#<Class:0x000055ce970cb0a0>:0x000055ce9744e970>
Did you mean?  protected_methods):
    21:
    22:       tbody
    23:         - @repository_protected_branches.each do |protected_branch|
    24:           tr.protected_branch id="protected_branch_#{protected_branch.id}"
    25:             td
    26:               span.handle
    27:                 | [drag]

plugins/redmine_git_hosting/app/views/repository_protected_branches/index.html.slim:24:in `_aae04a8d40650991c076c651599819fa'
plugins/redmine_git_hosting/app/controllers/redmine_git_hosting_controller.rb:49:in `block (2 levels) in render_with_api'
plugins/redmine_git_hosting/app/controllers/redmine_git_hosting_controller.rb:48:in `render_with_api'
plugins/redmine_git_hosting/app/controllers/repository_protected_branches_controller.rb:11:in `index'
lib/redmine/sudo_mode.rb:63:in `sudo_mode'
n-rodriguez added a commit that referenced this issue Sep 5, 2019
#734 fix protected_branches list and sort order
@Alwaysin
Copy link
Author

Thanks for the quick fix!

Confirmed working 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant