joomla/jissues — pull request #103 by elkuku (2013-05-09 17:47:27+00:00)
Title: User management

## User management

This will add the possibility to authenticate a user with his/her GitHub account using oAuth authentication.

#### Testing login
In order to test the login feature in your local environment you will need to create an application `key` and `secret` for your (local) JTrackerApplication instance:

* Sail to your account on GitHub ⇒ "Edit your Profile".
* Go to "Applications" - "Developer applications" and "Register new application"
* Fill in some name and some main url. Those will be presented to the user when authorizing the application.
* Fill in a domain for callback URL. This **must match** the domain the application is running. This may be `http://localhost` or a virtual host.
* Hit "Save" and copy the client_id and client_secret.
* Edit `config.json` and fill in the `client_id` and `client_secret`.
* Install as usual.
* Sail to your localhosts JTracker installation and click on "Login with GitHub"
* On the first attempt you will be redirected to GitHub where you have to confirm the access by your application.

## Session management
Is provided by the [session subsystem from the Symfony2 HttpFoundation Component](http://symfony.com/doc/master/components/http_foundation/sessions.html)

## Access control
The User class has a method [authorize()](https://github.com/joomla/jissues/blob/fr-gh-user/src/Joomla/Tracker/Authentication/User.php#L115) that is meant to be used by some ACL system for authorizing a given "action" for the logged in user.
Currently there is a config setting called "acl.admin_users" that holds a comma separated list of usernames with "admin permissions" - as a first step.

## Config editor
There is a "system component" that currently displays a config editor using simple text fields where you can fill in the values.
Saving is not provided yet. When hitting the save button the config is written to the screen where you might copy&paste it ;)
If you are on PHP < 5.4 there will be only a "compressed" version of the JSON string (a "pretty print" function could be written).
TBH - I only wrote this because it requires very little code and at some point we (or whoever uses a JSON based config file) might think about an UI for editing.

## New "routes"
* `users` - A users list
* `user` - The currently logged in user (profile view)
* `user/123` - The user with id `123`
* `config` - Edit configuration.

----

This is still very rough and only provides the very basic functionality. There are also some commits that doesn't really belong here (Travis and Jenkins toying) so if we cherry pick or even just copy the relevant files - that would be OK.