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

Protected branches user list never updated. Mass-assign warning. #553

Closed
wilsoc5 opened this Issue Dec 11, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@wilsoc5

wilsoc5 commented Dec 11, 2015

I just upgraded from 1.0.4 to the 1.2.0 and tested this, then updated to devel and tested. Both have the same problem:

If I create a new protected branch and select members, no members show up in the list at the bottom of the page.

If I check the database, the principal_id column in the protected_branches_members table is NULL for all entries.

If I manually change a principal_id in the database, I can get the name to show up. Same with multiple entries in the protected_branches_members table referring to the same protected branch.
If I uncheck a user in the edit box for that protected branch, that user is deleted appropriately.
Trying to add them back does not work, it simply creates a new entry in the protected_branches_members table with NULL set for the principal_id field.

I also get a warning:

WARNING: Can't mass-assign protected attributes for ProtectedBranchesMember: principal_id, inherited_by

That led me to adding

attr_accessible :principal_id, :inherited_by

to REDMINE_ROOT/plugins/redmine_git_hosting/app/models/protected_branches_member.rb

and suddenly adding users works.

Environment:
  Redmine version                3.0.1.stable
  Ruby version                   1.9.3-p484 (2013-11-22) [x86_64-linux]
  Rails version                  4.2.0
  Environment                    production
  Database adapter               PostgreSQL
SCM:
  Git                            1.9.1
  Filesystem                     
  Xitolite                       1.9.1
Redmine plugins:
  projects_table                 0.0.4
  redmine_banner                 0.1.1
  redmine_bootstrap_kit          0.2.4
  redmine_ckeditor               1.1.0
  redmine_git_hosting            1.2-devel
  redmine_per_project_formatting 0.0.4
  redmine_wiki_extensions        0.7.0
  userproj                       0.0.1
  wiki_latex                     0.1.0

@n-rodriguez n-rodriguez self-assigned this Jan 8, 2016

@n-rodriguez n-rodriguez added the bug label Jan 8, 2016

@n-rodriguez

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Jan 8, 2016

Member

Thanks!

Member

n-rodriguez commented Jan 8, 2016

Thanks!

n-rodriguez added a commit that referenced this issue Jul 23, 2016

@n-rodriguez n-rodriguez added this to the v1.2.1 milestone Jul 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment