Commit graph

25 commits

Author SHA1 Message Date
Boyan Tabakov
479631aafc Extended User API to expose admin and can_create_group for user creation/updating.
Also, is_admin and can_create_group are exposed in the user information.
Fixed attributes_for_keys to process properly keys with boolean values (since false.present? is false).
2013-09-29 11:47:29 +03:00
Izaak Alpert
5dae40f579 Update to only provide one way to get a default user
-calling build_user will now apply defaults and only override them if as: :admin is set

Change-Id: Id1d938c0967752ecc14370af54f2d88128d18c44
2013-09-11 14:04:15 -04:00
Izaak Alpert
d4d4a78f83 Update User api to respect default settings
-API now respects default_projects_limit, default_can_create_group, and default_can_create_team

Change-Id: I059d060d576df1050e5371e707381c5e8c608a7a
2013-09-11 14:04:15 -04:00
Dmitriy Zaporozhets
634cbd7138 Refactor API classes. So api classes like Gitlab::Issues become API::Issues 2013-05-14 15:33:31 +03:00
Dmitriy Zaporozhets
4528fa9817 modify api to work with new deploy keys 2013-05-06 16:24:58 +03:00
Dmitriy Zaporozhets
880cb8aa48 Paginate users in users api 2013-04-16 09:26:01 +03:00
Dmitriy Zaporozhets
3b42c267a6 Dont show blocked users in autocomplete 2013-03-19 18:07:14 +02:00
Alex Denisov
28e7d1a8bf Abilities added to /user and /sign_in requests 2013-03-18 20:11:28 +00:00
Kevin Lyda
415bade302 Result of misspellings run.
Most of these are comments but a few are strings for users.

Might be an idea to run this from time to time:
https://github.com/lyda/misspell-check

It runs mostly clean now.
2013-03-17 19:46:54 +00:00
Dmitriy Zaporozhets
bf17d976a7 add api users filter and integrate users select2 2013-03-13 23:19:09 +02:00
Sebastian Ziebell
3374027e3a Merge branch 'master' into fixes/api, code clean up and tests fixed
Conflicts:
	doc/api/projects.md
	spec/requests/api/projects_spec.rb
2013-03-07 14:51:56 +01:00
Angus MacArthur
61ffcab60f Additional Admin APIs 2013-03-05 10:38:43 -05:00
Sebastian Ziebell
7499f65014 API: extracted helper method to validate required parameters, code clean up
Added a helper method to check if required parameters are given in an API call. Can be used
to return a `400 Bad Request` return code if a required attribute is missing.
Code clean up and fixed tests.
2013-02-27 17:50:30 +01:00
Sebastian Ziebell
1b97a2eee8 API: fixes return codes, documentation updated with status codes, tests added
The users API updated with return codes, e.g. if required parameters are missing
a `400 Bad Request` error is returned instead of `404`. Fixes return codes of functions,
e.g. deletion of a ssh key is an idempotent function now.
The API documentation is updated to reflect the current status of the API. Descriptions
are more detailed and complete, infos to return values are added to all functions.
2013-02-20 12:23:56 +01:00
Boyan Tabakov
e954438a1d Extended users API to support updating and deleting users.
Also added tests.
2012-12-18 21:24:31 +02:00
Cyril
63d9373aa8 Validates presence of User#name
The 2 reasons are :
- creation of user fail if name is empty : in after_save, it tries to create a
namespace with namespace.name = user.name and namespece validates presence
Namespace#name
- in the web app links to team members are broken with empty User#name because
they are of the form <a href'...'> user.name </a>
2012-12-12 17:53:43 +01:00
Dmitriy Zaporozhets
0693215c30 Fixed spinach and tests. Build should pass now 2012-11-23 22:55:38 +02:00
Nihad Abbasov
00325a733a name and password_confirmation not required to create a user via API 2012-10-19 03:34:18 -07:00
Nihad Abbasov
c610206321 fix mass-assignment error in user create API 2012-10-19 03:23:10 -07:00
Valeriy Sizov
d104df49e7 fix TYPO 2012-10-02 16:34:20 +03:00
Valeriy Sizov
825081174a #1585 Api for user creation: base implementation 2012-10-02 12:46:01 +03:00
Nihad Abbasov
b62445813d API: SSH keys belong to user entity 2012-09-21 04:49:28 -07:00
Nihad Abbasov
76e4d94d43 add pagination to API 2012-09-03 04:46:29 -07:00
Robert Speicher
7754189187 Fully embrace Ruby 1.9 hash syntax
Didn't bother with files in db/, config/, or features/
2012-08-10 18:25:15 -04:00
Nihad Abbasov
0d67f209fc refactor API and improve docs 2012-06-29 03:46:01 -07:00