original_string: public function inAllowedGroup()
      {
          if ($this->isCurrentUser() || (! $this->isStaff())) {
              // Always allow editing of non-staff user
              // for the time being
              return true;
          }
  
          $group  = $this->getGroupId();
          $groups = $this->util->getDbLookup()->getActiveStaffGroups();
          if (! isset($groups[$group])) {
              // Allow editing when the group does not exist or is no longer active.
              return true;
          }
  
          $allowedGroups = $this->userLoader->getCurrentUser()->getAllowedStaffGroups();
          if ($allowedGroups) {
              return (boolean) isset($allowedGroups[$group]);
          } else {
              return false;
          }
      }
code: public function inAllowedGroup()
      {
          if ($this->isCurrentUser() || (! $this->isStaff())) {
              // Always allow editing of non-staff user
              // for the time being
              return true;
          }
  
          $group  = $this->getGroupId();
          $groups = $this->util->getDbLookup()->getActiveStaffGroups();
          if (! isset($groups[$group])) {
              // Allow editing when the group does not exist or is no longer active.
              return true;
          }
  
          $allowedGroups = $this->userLoader->getCurrentUser()->getAllowedStaffGroups();
          if ($allowedGroups) {
              return (boolean) isset($allowedGroups[$group]);
          } else {
              return false;
          }
      }
code_tokens: public function inAllowedGroup ( ) { if ( $ this -> isCurrentUser ( ) || ( ! $ this -> isStaff ( ) ) ) { // Always allow editing of non-staff user // for the time being return true ; } $ group = $ this -> getGroupId ( ) ; $ groups = $ this -> util -> getDbLookup ( ) -> getActiveStaffGroups ( ) ; if ( ! isset ( $ groups [ $ group ] ) ) { // Allow editing when the group does not exist or is no longer active. return true ; } $ allowedGroups = $ this -> userLoader -> getCurrentUser ( ) -> getAllowedStaffGroups ( ) ; if ( $ allowedGroups ) { return ( boolean ) isset ( $ allowedGroups [ $ group ] ) ; } else { return false ; } }
docstring: Return true if this user has a role that is accessible by the current user,
  i.e. is the current user allowed to change this specific user
  
  @return boolean
docstring_tokens: Return true if this user has a role that is accessible by the current user i . e . is the current user allowed to change this specific user