This is a requirement for how the maintainers system works, since it loads all data from all modules that implement the hooks. There is no way for versioncontrol_project to know that a row is deleted, just that it is empty, so it populates the row in the maintainers tab with all checkboxes set to FALSE.

I think the method could look something like this:


public function removeUser($uid) {
  unset($this->userData[$uid]);
}

CommentFileSizeAuthor
#2 1003946-delete-user_data-method-1.patch1.37 KBmikey_p

Comments

mikey_p’s picture

Status: Active » Needs review

The only other approach that I can think of other than the one outlined in the attached patch, would be to provide a method that allows completely replacing the userData member variable, something along the lines of setUserData(), but with something like this:

$this->userData = $data;

instead of this:

$this->userData[$uid] = $data;

As it is now, this patch works, and I've updated that patch for #781344: Extend project maintainer UI for manipulating git project ACLs and it works great with this patch.

mikey_p’s picture

StatusFileSize
new1.37 KB

Forgot the patch

sdboyer’s picture

Status: Needs review » Fixed

Looks good. Committed.

Status: Fixed » Closed (fixed)
Issue tags: -git phase 2, -git sprint 7

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit d9eb059 on repository-families, drush-vc-sync-unlock by sdboyer:
    Issue #1003946 by mikey_p: Allow VersioncontrolAuthHandlerMappedAccounts...

  • Commit d9eb059 on repository-families by sdboyer:
    Issue #1003946 by mikey_p: Allow VersioncontrolAuthHandlerMappedAccounts...