James Lopez
6ecf16b8f7
refactor code based on feedback
2017-05-05 18:01:33 +02:00
James Lopez
cf002738e7
refactor a few things based on feedback
2017-05-04 18:11:28 +02:00
Dmitriy Zaporozhets
bae1644015
Refactor Admin::GroupsController#members_update method and add some specs
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2017-04-20 19:25:02 +03:00
Sean McGivern
0483019e98
Port 'Add more usage data to EE ping' to CE
...
CE port of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/735
2017-04-14 15:20:55 +02:00
Toon Claes
5058fc67ac
Remove redundant code to convert restricted_levels to integers
...
The ApplicationSetting#restricted_visibility_levels= now takes care of
converting string formatted levels to integers.
2017-03-23 15:25:42 +01:00
Toon Claes
7bfa523485
Resolve future conflicts with CE -> EE merge
...
EE already includes specs for the ApplicationSettingsController, so
ensure future changes will be easier to merge to EE.
2017-03-23 11:13:11 +01:00
Toon Claes
4e1cebabc7
Undo explicit conversion to Integer
...
With the changes in Gitlab::VisibilityLevel it is no longer needed to
explicit conversion to Integer in the controller itself.
2017-03-20 22:57:45 +01:00
Markus Koller
789db2cc19
Make sure scopes are loaded in admin OAuth application form
2017-03-07 14:54:36 +01:00
Lin Jen-Shin
60288d6c62
Use expect { }.to change { }
...
Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8664#note_23427575
2017-02-15 20:21:51 +08:00
Lin Jen-Shin
3856a3daa1
Add some tests for admin/project runners page
2017-02-15 19:16:12 +08:00
Robert Speicher
4642ca6686
Use `empty_project` where possible in controller specs
2017-01-25 17:14:38 -05:00
Z.J. van de Weg
df99883d44
Add tests for admin service templates
2017-01-06 13:21:49 +01:00
Oren Kanner
8dd9a8b6e0
Allow admins to stop impersonating users without e-mail addresses
...
Resolves #24576
Modify the guard clause of the `ApplicationController#require_email`
before action to skip requests where an admin is impersonating the
current user.
2016-11-17 23:28:39 -05:00
Steve Halasz
36ec5eaf85
Only show one error message for an invalid email
...
If notification_email is blank, it's set from email. If an admin
attempted to create a user with an invalid email, an error would be
displayed for both fields. Only validate the notification_email if it's
different from email.
2016-10-27 15:46:28 -04:00
Stan Hu
e665444724
Fix incorrect "stopped impersonation" log message
...
Closes #21015
2016-08-23 01:09:16 -07:00
Robert Speicher
7fef2f7b75
Merge branch 'akismet-submittable' into 'master'
...
Submit to Akismet Part 1 (Issues)
Related to #5932 #5573 gitlab-com/infrastructure#14
See merge request !5538
2016-08-15 22:59:47 +00:00
Patricio Cano
5994c11910
Further refactor and syntax fixes.
2016-08-15 17:20:57 -05:00
Kamil Trzcinski
e8aab1cd15
This fixes a long running tests due to changed Sidekiq state
2016-08-15 23:26:40 +02:00
Patricio Cano
43e756d4ea
Refactored AkismetHelper into AkismetService and cleaned up `Spammable`
...
- Refactored SpamCheckService into SpamService
2016-08-15 13:18:15 -05:00
Patricio Cano
96399a81cb
Allow `Issue` to be submitted as spam
...
- Added controller actions as reusable concerns
- Added controller tests
2016-08-15 13:18:15 -05:00
Stan Hu
cb8a425ba4
Fix bug where destroying a namespace would not always destroy projects
...
There is a race condition in DestroyGroupService now that projects are deleted asynchronously:
1. User attempts to delete group
2. DestroyGroupService iterates through all projects and schedules a Sidekiq job to delete each Project
3. DestroyGroupService destroys the Group, leaving all its projects without a namespace
4. Projects::DestroyService runs later but the can?(current_user,
:remove_project) is `false` because the user no longer has permission to
destroy projects with no namespace.
5. This leaves the project in pending_delete state with no namespace/group.
Projects without a namespace or group also adds another problem: it's not possible to destroy the container
registry tags, since container_registry_path_with_namespace is the wrong value.
The fix is to destroy the group asynchronously and to run execute directly on Projects::DestroyService.
Closes #17893
2016-08-11 15:36:35 -07:00
tiagonbotelho
519275c110
fixes part1 of files to start using active tense
2016-08-09 15:06:23 +01:00
Alfredo Sumaran
338072cc4b
Layout for Users Groups and Projects on admin area
2016-07-07 13:25:58 -05:00
Z.J. van de Weg
abca19da8b
Use HTTP matchers if possible
2016-06-27 20:10:42 +02:00
Robert Speicher
75739e54be
Enable RSpec/NotToNot cop and auto-correct offenses
...
Also removes the note from the development/testing.md guide
2016-05-24 15:40:29 -04:00
Sean McGivern
bec350528c
Force password change after admin reset
...
When an admin changes a user's password for them, force the user to
reset the password after logging in by expiring the new password
immediately.
2016-05-16 09:21:24 +01:00
Douwe Maan
b992e2520c
Fix typo
2016-04-22 21:46:47 +00:00
Douwe Maan
d3462e711c
Fix issue with impersonation
2016-04-22 23:21:56 +02:00
PotHix
222e1dc59c
Fixes #14638 .
...
The SQL query was ambiguous and in this case we want to filter projects.
2016-04-06 13:56:28 -03:00
Zeger-Jan van de Weg
340f1fc976
Minor clean up on admin/users_controller_spec
2016-03-31 22:29:32 +02:00
Douglas Barbosa Alexandre
eefc46e0d5
Fix rubocop offenses
2016-02-02 11:25:44 -02:00
Douglas Barbosa Alexandre
718b1dddfe
Refactor Admin::SpamLogsController to block user before destroying
2016-02-02 11:25:44 -02:00
Stan Hu
d20e75a8d8
Support Akismet spam checking for creation of issues via API
...
Currently any spam detected by Akismet by non-members via API will be logged
in a separate table in the admin page.
Closes #5612
2016-02-02 11:25:44 -02:00
Gabriel Mazetto
ec67e9be1d
Repair ldap_blocked state when no ldap identity exist anymore
2016-01-08 16:26:04 -02:00
Gabriel Mazetto
ba9855d487
Prevent ldap_blocked users from being unblocked by the Admin UI
2016-01-08 16:26:04 -02:00
Andrew Tomaka
daca985a6e
Prevent impersonation if blocked
2015-12-02 08:07:29 -05:00
James Newton
3bb626f91c
refactor login as to be impersonation with better login/logout
...
Modifies the existing "login as" feature to be called impersonation, as
well as keeping track of who is impersonating to revert back to that
user without having to log out.
2015-10-29 11:00:17 +01:00
Stan Hu
9bfc531ec6
Redirect to a default path if HTTP_REFERER is not set
...
Safari 9.0 does not yet honor the HTML5 `origin-when-cross-origin` mode,
and it's possible load balancers/proxies strip the HTTP_REFERER from
the request header. In these cases, default to some default path.
Closes #3122
Closes https://github.com/gitlabhq/gitlabhq/issues/9731
2015-10-20 07:45:48 -07:00
Pavel Forkert
eb9528b8b9
Move login button to user page, switched to POST method
2015-09-24 16:34:04 +03:00
Pavel Forkert
83347954fc
Add option to admin area to sign in as a specific user
...
Closes #2291
2015-09-24 16:14:16 +03:00
Stan Hu
0c1ccda43f
Add "Confirm user" button in user admin page
...
Closes #2116
Closes https://github.com/gitlabhq/gitlabhq/issues/9502
2015-08-05 00:35:53 -07:00
Robert Speicher
800df45db2
Add disable_two_factor route for Admin::Users
2015-07-10 17:18:17 -04:00
Stan Hu
3e738e3b9a
Add support for unlocking users in admin settings
...
Closes https://github.com/gitlabhq/gitlabhq/issues/9381
2015-07-02 04:22:51 -07:00
Stan Hu
e80d7a804f
Fix error when deleting a user who has projects
...
Closes #1856
Closes https://github.com/gitlabhq/gitlabhq/issues/9394
2015-06-23 04:39:49 -07:00