Skip to content

taigaio/taiga-contrib-gitlab-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Taiga contrib gitlab auth

> READ THIS FIRST!: We recently announced Taiga plans for the future and they greatly affect how we manage this repository and the current Taiga 6 release. Check it here.

Managed with Taiga.io

The Taiga plugin for gitlab authentication (Ported from official gitlab auth).

Production env

Take the latest release of this repository, for instance:

export TAIGA_CONTRIB_GITLAB_AUTH_TAG=6.0.0

Taiga Back

Load the python virtualenv from your Taiga back directory:

source .venv/bin/activate

And install the package taiga-contrib-gitlab-auth-official with:

  (taiga-back) pip install "git+https://github.com/taigaio/taiga-contrib-gitlab-auth.git@${TAIGA_CONTRIB_GITLAB_AUTH_TAG}#egg=taiga-contrib-gitlab-auth-official&subdirectory=back"

Modify your settings/config.py and include the line:

  INSTALLED_APPS += ["taiga_contrib_gitlab_auth"]

  # Get these from Admin -> Applications
  GITLAB_API_CLIENT_ID = "YOUR-GITLAB-CLIENT-ID"
  GITLAB_API_CLIENT_SECRET = "YOUR-GITLAB-CLIENT-SECRET"
  GITLAB_URL="YOUR-GITLAB-URL"

Tip the callback url in the Gitlab configuration should be the same as the {TAIGA_URL}/login environment variable.

Taiga Front

Download in your dist/plugins/ directory of Taiga front the taiga-contrib-gitlab-auth compiled code (you need subversion in your system):

  cd dist/
  mkdir -p plugins
  cd plugins
  svn export "https://github.com/taigaio/taiga-contrib-gitlab-auth/tags/${TAIGA_CONTRIB_GITLAB_AUTH_TAG}/front/dist"  "gitlab-auth"

Include in your dist/conf.json in the 'contribPlugins' list the value "plugins/gitlab-auth/gitlab-auth.json":

...
"gitLabClientId": "YOUR-GITLAB-CLIENT-ID",
"gitLabUrl": "YOUR-GITLAB-URL",
"contribPlugins": [
  (...)
  "plugins/gitlab-auth/gitlab-auth.json"
]
...

Dev env

This configuration should be used only if you're developing this library.

Taiga Back

Clone the repo and

  cd taiga-contrib-gitlab-auth/back
  workon taiga
  pip install -e .

Modify taiga-back/settings/local.py and include the line:

  INSTALLED_APPS += ["taiga_contrib_gitlab_auth"]

  # Get these from Admin -> Applications
  GITLAB_API_CLIENT_ID = "YOUR-GITLAB-CLIENT-ID"
  GITLAB_API_CLIENT_SECRET = "YOUR-GITLAB-CLIENT-SECRET"
  GITLAB_URL="YOUR-GITLAB-URL"

Taiga Front

After clone the repo link dist in taiga-front plugins directory:

  cd taiga-front/dist
  mkdir -p plugins
  cd plugins
  ln -s ../../../taiga-contrib-gitlab-auth/front/dist gitlab-auth

Include in your dist/conf.json in the 'contribPlugins' list the value "plugins/gitlab-auth/gitlab-auth.json":

...
    "gitLabClientId": "YOUR-GITLAB-CLIENT-ID",
    "gitLabUrl": "YOUR-GITLAB-URL",
    "contribPlugins": [
        (...)
        "plugins/gitlab-auth/gitlab-auth.json"
    ]
...

In the plugin source dir taiga-contrib-gitlab-auth/front run

npm install

and use:

  • gulp to regenerate the source and watch for changes.
  • gulp build to only regenerate the source.

Running tests

We only have backend tests, you have to add your taiga-back directory to the PYTHONPATH environment variable, and run py.test, for example:

  cd back
  add2virtualenv /home/taiga/taiga-back/
  py.test

Documentation

Currently, we have authored three main documentation hubs:

  • API: Our API documentation and reference for developing from Taiga API.
  • Documentation: If you need to install Taiga on your own server, this is the place to find some guides.
  • Taiga Community: This page is intended to be the support reference page for the users.

Bug reports

If you find a bug in Taiga you can always report it:

One of our fellow Taiga developers will search, find and hunt it as soon as possible.

Please, before reporting a bug, write down how can we reproduce it, your operating system, your browser and version, and if it's possible, a screenshot. Sometimes it takes less time to fix a bug if the developer knows how to find it.

Community

If you need help to setup Taiga, want to talk about some cool enhancemnt or you have some questions, please go to Taiga community.

If you want to be up to date about announcements of releases, important changes and so on, you can subscribe to our newsletter (you will find it by scrolling down at https://taiga.io) and follow @taigaio on Twitter.

Contribute to Taiga

There are many different ways to contribute to Taiga's platform, from patches, to documentation and UI enhancements, just find the one that best fits with your skills. Check out our detailed contribution guide.

Code of Conduct

Help us keep the Taiga Community open and inclusive. Please read and follow our Code of Conduct.

License

Every code patch accepted in Taiga codebase is licensed under MPL 2.0. You must be careful to not include any code that can not be licensed under this license.

Please read carefully our license and ask us if you have any questions as well as the Contribution policy.