Merges in the authorization information in this authority for the
 given user.

 @param [Aker::User] user the target user

 @return [Aker::User] the input user, modified
5502
def amplify!(user)
      base = self.find_user(user.username)
      return user unless base

      user.extend UserExt
      user.ldap_attributes = base.ldap_attributes

      user.merge!(base)
    end
819338
def delete(options = {})
      options = options.merge(user_name: @name)
      resp = @client.delete_user(options)
      resp.data
    end
848547
def get_user(request):
    
    if not hasattr(request, '_cached_user'):
        request._cached_user = auth_get_user(request)
    return request._cached_user
446685
def users
      identifier = ::CurrentUser.identifier

      if identifier.respond_to? :call
        ::User.all.sort { |x,y| identifier.call(x) <=> identifier.call(y) }
      else
        ::User.order identifier.to_s
      end
    end
115342
def user(self):
        
        if self.api and self.user_id:
            return self.api._get_user(self.user_id)
1280913
def delete_user(self, user):
        
        self.service.delete_user(
            user, self.url_prefix, self.auth, self.session, self.session_send_opts)
1160224
def update
      # TODO: replace with authorize/ability
      if current_user.admin_role.in? %w(admin sub_tenant_admin)
        @user = MnoEnterprise::User.find(params[:id])

        @user.update(user_update_params)
        @user_clients = @user.clients
        render :show
      else
        render :index, status: :unauthorized
      end
    end
513067
def users_me_merge(self, data, **kwargs):
        ""
        api_path = "/api/v2/users/me/merge.json"
        return self.call(api_path, method="PUT", data=data, **kwargs)
683131
def delete_user(self, user):
        
        name = utils.get_name(user)
        self._user_manager.delete(name)
945906
def parse_user(user)
      user.slice! 0, 4 if user =~ /sip:/
      user = user.split(":")[0]
      user, domain = user.split("@")
      domain ||= "[remote_ip]"
      [user, domain]
    end
412563
def get_authorization_user(self, **kwargs):
        """"""
        if self.authorization_user is not None:
            return self.authorization_user

        self.authorization_user = self.request.user
        return self.request.user
126453
def user(id)
      data = request("/user/show", id: id)
      Hashie::Mash.new(data["user"])
    end
736803
def current_user
      core_id = Origen::Users::User.current_user_id
      user = app_users.find { |user| user.core_id == core_id }
      user || User.new(core_id)
    end
1144723
def create
      @user = User.new(user_params.except(:user_roles))
      authorize! :create, @user
      build_user_roles(params)

      if @user.save
        redirect_to @user,
                    notice: "User was successfully created."
      else
        render :new
      end
    end
831070
def authorize(action, subject)
      context.send(:authorize, subject, normalize(action)) && subject
    rescue ::Pundit::NotAuthorizedError
      Rails.logger.info I18n.t('errors.unauthorized', user: user, action: action, subject: subject)
      raise Forbidden
    end
421049
def merge_user_commits(cls, commits):
        
        user = None
        for commit in commits:
            if not user:
                user = commit
            else:
                if commit.committer_time > user.committer_time:
                    commit.line_count += user.line_count
                    user = commit
                else:
                    user.line_count += commit.line_count
        return user
813742
def create_user(user, opts = {})
      data, _status_code, _headers = create_user_with_http_info(user, opts)
      return data
    end