summaryrefslogtreecommitdiff
path: root/app/controllers/admin
Commit message (Collapse)AuthorAgeFilesLines
* Support configurable attachment size via Application SettingsStan Hu2015-04-021-0/+1
| | | | | | Fix bug where error messages from Dropzone would not be displayed on the issues page Closes #1258
* Include missing events and fix save functionality in admin service template ↵Stan Hu2015-03-231-1/+3
| | | | | | settings form Closes #1275
* Fix restricted visibility bugsVinnie Okada2015-03-161-1/+3
| | | | | | Check for nil values in the restricted_visibility_level validation method, and set the restricted visibility request parameter to `[]` when it's missing from the request.
* Merge branch 'fix-restricted-visibility' into 'master'Dmitriy Zaporozhets2015-03-161-1/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restricted visibility levels - bug fix and new feature This allows admin users to override restricted visibility settings when creating and updating projects and snippets, and moves the restricted visibility configuration from gitlab.yml to the web UI. See #1903. ## Move configuration location I added a new section to the application settings page for restricted visibility levels. Each level has a checkbox, styled with Bootstrap to look like a toggle button. A checked box means that the level is restricted. I added a glowing text shadow and changed the background color for checked buttons because the default styles made it hard to distinguish between checked and unchecked. This image shows the new section with the "Public" box checked: ![restricted_visibility_settings](https://dev.gitlab.org/Okada/gitlabhq/uploads/629562e4313f89b795e81c3bb0f95893/restricted_visibility_settings.png) ## Allow admins to override To allow admin users to override the restricted visibility levels, I had to remove the `visibility_level` validation from the `Project` class. The model doesn't know about the `current_user`, which should determine whether the restrictions can be overridden. We could use the creator in the validation, but that wouldn't work correctly for projects where a non-admin user is the creator and an admin tries to change the project to a restricted visibility level. The `Project::UpdateService` and `Project::CreateService` classes already had code to determine whether the current user is allowed to use a given visibility level; now all visibility level validation is done in those classes. Currently, when a non-admin tries to create or update a project using a restricted level, these classes silently set the visibility level to the global default (create) or the project's existing value (update). I changed this behavior to be more like an Active Model validation, where using a restricted level causes the entire request to be rejected. Project and personal snippets didn't have service classes, and restricted visibility levels weren't being enforced in the model or the controllers. The UI disabled radio buttons for restricted levels, but that wouldn't be difficult to circumvent. I created the `CreateSnippetService` and `UpdateSnippetService` classes to do the same restricted visibility check that the project classes do. And since I was dealing with snippet visibility levels, I updated the API endpoints for project snippets to allow users to set and update the visibility level. ## TODO * [x] Add more tests for restricted visibility functionality cc @sytse @dzaporozhets See merge request !1655
| * Merge branch 'master' into fix-restricted-visibilityVinnie Okada2015-03-144-9/+10
| |\ | | | | | | | | | | | | Conflicts: db/schema.rb
| * | Move restricted visibility settings to the UIVinnie Okada2015-03-071-1/+9
| | | | | | | | | | | | | | | Add checkboxes to the application settings page for restricted visibility levels, and remove those settings from gitlab.yml.
* | | Use `project_member` instead of `team_member`.Douwe Maan2015-03-151-2/+2
| |/ |/|
* | Use same constant for amount of items per pageDmitriy Zaporozhets2015-03-122-6/+6
| |
* | Improve user block/unblock UI in admin areaDmitriy Zaporozhets2015-03-091-2/+2
| |
* | Add option to disable code diffs to EmailOnPush.Douwe Maan2015-02-251-1/+1
| | | | | | | | See #1950
* | Add option to send EmailsOnPush from committer email if domain matches.Douwe Maan2015-02-251-1/+2
|/ | | | See #1809.
* Merge branch 'master' into rails-4.1.9Vinnie Okada2015-02-191-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: app/views/dashboard/_project.html.haml app/views/events/event/_common.html.haml app/views/explore/projects/_project.html.haml app/views/groups/_projects.html.haml app/views/projects/_home_panel.html.haml app/views/projects/_issues_nav.html.haml app/views/projects/issues/_discussion.html.haml app/views/projects/issues/_issues.html.haml app/views/projects/issues/show.html.haml app/views/projects/merge_requests/_discussion.html.haml app/views/projects/merge_requests/_show.html.haml app/views/projects/milestones/index.html.haml app/views/projects/notes/_edit_form.html.haml app/views/shared/_issuable_filter.html.haml
| * Merge branch 'tweet-new-project'Dmitriy Zaporozhets2015-02-151-0/+1
| |\ | | | | | | | | | | | | Conflicts: db/schema.rb
| | * Add link to share via twitter to "created project" event.Douwe Maan2015-02-131-0/+1
| | |
* | | Upgrade to Rails 4.1.9Vinnie Okada2015-02-141-2/+5
|/ / | | | | | | | | | | Make the following changes to deal with new behavior in Rails 4.1.2: * Use nested resources to avoid slashes in arguments to path helpers.
* | Allow users that signed up via OAuth to set their password in order to use ↵Douwe Maan2015-02-131-1/+1
|/ | | | Git over HTTP(S).
* Use the service_name.Marin Jankovski2015-02-121-2/+2
|
* All services can have templates.Marin Jankovski2015-02-121-7/+7
|
* Add admin services templates.Marin Jankovski2015-02-111-0/+51
|
* Merge branch 'notification_email'Dmitriy Zaporozhets2015-02-071-0/+3
|\ | | | | | | | | Conflicts: db/schema.rb
| * Allow notification email to be set separately from primary email.Douwe Maan2015-02-071-0/+3
| | | | | | | | Closes #1932.
* | Refactor sorting in projectDmitriy Zaporozhets2015-02-052-3/+4
| |
* | Explicitly define ordering in models using default_scopeDmitriy Zaporozhets2015-02-053-6/+6
|/
* Allow configuring protection of the default branch upon first pushMarco Wessel2015-01-251-0/+1
|
* Merge branch 'doorkeeper_applications_scafold'Dmitriy Zaporozhets2015-01-171-0/+52
|\
| * Small improvements to CIDmitriy Zaporozhets2015-01-171-1/+1
| |
| * Application admin scaffoldValery Sizov2015-01-171-0/+52
| |
* | Allow to specify home page for non logged-in usersDmitriy Zaporozhets2015-01-161-0/+1
|/
* Create ApplicationSettings if does not exist in runtimeDmitriy Zaporozhets2015-01-081-1/+1
|
* Improve application settings and write testsDmitriy Zaporozhets2015-01-081-6/+6
|
* Init ApplicationSettings resource with defaults from config fileDmitriy Zaporozhets2015-01-081-0/+31
|
* Share the key table between admin and profile resources.Marin Jankovski2014-12-301-1/+1
|
* Move user key manipulation in admin section to a separate controller.Marin Jankovski2014-12-302-21/+34
|
* Add user key actions to admins.Marin Jankovski2014-12-291-1/+23
|
* Set group name from path in admin controllerDmitriy Zaporozhets2014-12-221-1/+1
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge pull request #8005 from cirosantilli/settings-to-gitlab-configDmitriy Zaporozhets2014-10-271-1/+1
|\ | | | | Use Gitlab.config instead of Settings everywhere
| * Use Gitlab.config instead of Settings everywhereCiro Santilli2014-10-151-1/+1
| |
* | Remove unused admin/projects#repository methodCiro Santilli2014-10-211-4/+0
| | | | | | | | Already defined on the ApplicationController base class.
* | Merge pull request #8102 from cirosantilli/use-memoized-projectDmitriy Zaporozhets2014-10-211-2/+2
|\ \ | | | | | | Use @project on controllers, don't call method
| * | Use @project on controllers, don't call methodCiro Santilli2014-10-191-2/+2
| |/ | | | | | | | | Also memoize the method to ensure that other methods in ApplicationController that rely on it can call it efficiently.
* | Remove param[:project_id] at admin controllerCiro Santilli2014-10-191-3/+1
|/ | | | The route never passes that parameter to the helpers.
* Admin: user sortingValery Sizov2014-10-131-0/+1
|
* Huge replace of old users_project and users_group referencesDmitriy Zaporozhets2014-09-142-4/+4
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Merge branch 'new_user_password_set' into 'master'Dmitriy Zaporozhets2014-07-231-1/+2
|\ | | | | | | | | | | | | | | Admin created user should get password reset link instead of mailed temporary password Fixes #1405 See merge request !973
| * Do not set password expiry.Marin Jankovski2014-07-151-1/+1
| |
| * Do not sent a generated password via email for admin created user.Marin Jankovski2014-07-151-0/+1
| |
* | Fix user params when edit from admin areaDmitriy Zaporozhets2014-07-161-2/+4
|/ | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Make app works with strong paramsDmitriy Zaporozhets2014-06-261-17/+10
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Project hook, milestone, snippet strong paramsDmitriy Zaporozhets2014-06-261-1/+5
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Group and Event strong_paramsDmitriy Zaporozhets2014-06-261-2/+6
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>