Skip to content
This repository was archived by the owner on Oct 24, 2019. It is now read-only.
This repository was archived by the owner on Oct 24, 2019. It is now read-only.

create project for user #74

Closed
Closed

Description

@sahilsk

First of all thank you for writing this nice client

Now, coming to my query. I"m trying to create a new project using admin api-token for a user.

    new_project = {
         user_id : 22
        , name: job.data.name
        , description: "ishir user project"
        , issues_enabled: false
        , merge_requests_enabled: false
        , wiki_enabled: false
        , snippets_enabled: false
        , public: false
        , 
    }
    gitlab.projects.create( new_project, function( result){
         logger.debug( result);
    })

Code does create a new project but for different user not the one specified in option(i.e 22).
It always choose user_id of admin user (whose token is used to make request). :(

Any help here would be great.

Activity

  1. moul commented on Feb 26, 2015

    @moul
    Owner

    https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/projects.md#create-project-for-user

    The gitlab api uses a different route when creating a project for another user and we only implemented the one for current user:
    https://github.com/node-gitlab/node-gitlab/blob/develop/src/Models/Projects.coffee#L43-L45

    We need to add a new create_for_user new method or check the presence of user_id in the parameter and switch from one route to another

  2. sahilsk commented on Feb 26, 2015

    @sahilsk
    Author

    ohk...thanks for prompt response. :)

  3. self-assigned this
    on Feb 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions