hunk.code_window: 	err = handler.DataStore.User().Create(user)
   	if err != nil {
   		return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist user inside the database", err}
   	}
   	err = handler.addUserIntoTeams(user, ldapSettings)
  
hunk.labels: keep replace replace replace keep keep keep
hunk.after_edit: 		err = handler.DataStore.User().Create(user)
   		if err != nil {
   			return &httperror.HandlerError{http.StatusInternalServerError, "Unable to persist user inside the database", err}
   		}
  
hunk.file_path: api/http/handler/auth/authenticate.go
hunk.type: replace
file: angular.module('portainer.app').factory('ResourceControl', [
    '$resource',
    'API_ENDPOINT_RESOURCE_CONTROLS',
    function ResourceControlFactory($resource, API_ENDPOINT_RESOURCE_CONTROLS) {
      'use strict';
      return $resource(
        API_ENDPOINT_RESOURCE_CONTROLS + '/:id',
        {},
        {
          create: { method: 'POST', ignoreLoadingBar: true },
          get: { method: 'GET', params: { id: '@id' } },
          update: { method: 'PUT', params: { id: '@id' } },
          remove: { method: 'DELETE', params: { id: '@id' } },
        }
      );
    },
  ]);
  