<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/app/services/projects, branch shell-version-warning</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Support configurable attachment size via Application Settings</title>
<updated>2015-04-02T07:04:08+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2015-03-20T12:11:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=dfd256f29ee817b5ffc563bb554a02d26ae44502'/>
<id>dfd256f29ee817b5ffc563bb554a02d26ae44502</id>
<content type='text'>
Fix bug where error messages from Dropzone would not be displayed on the issues page

Closes #1258
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix bug where error messages from Dropzone would not be displayed on the issues page

Closes #1258
</pre>
</div>
</content>
</entry>
<entry>
<title>notification on project moving</title>
<updated>2015-03-25T16:28:39+00:00</updated>
<author>
<name>Valery Sizov</name>
<email>vsv2711@gmail.com</email>
</author>
<published>2015-03-25T16:18:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=c8fb972606538298ce000ea16b8037bb6569b63f'/>
<id>c8fb972606538298ce000ea16b8037bb6569b63f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'fix-restricted-visibility' into 'master'</title>
<updated>2015-03-16T17:49:46+00:00</updated>
<author>
<name>Dmitriy Zaporozhets</name>
<email>dzaporozhets@gitlab.com</email>
</author>
<published>2015-03-16T17:49:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=648f38cd98eed41ddf56613194f2d91c0e5b1fbb'/>
<id>648f38cd98eed41ddf56613194f2d91c0e5b1fbb</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Use `project_member` instead of `team_member`.</title>
<updated>2015-03-15T12:50:38+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2015-03-13T15:22:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=31fc73f0a9b9225ba3737b9525fcf7a1695a45f2'/>
<id>31fc73f0a9b9225ba3737b9525fcf7a1695a45f2</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Enforce restricted visibilities for snippets</title>
<updated>2015-03-08T23:57:08+00:00</updated>
<author>
<name>Vinnie Okada</name>
<email>vokada@mrvinn.com</email>
</author>
<published>2015-03-07T19:47:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=928fc94c3d900069902b097d6464acee712a886c'/>
<id>928fc94c3d900069902b097d6464acee712a886c</id>
<content type='text'>
Add new service classes to create and update project and personal
snippets.  These classes are responsible for enforcing restricted
visibility settings for non-admin users.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add new service classes to create and update project and personal
snippets.  These classes are responsible for enforcing restricted
visibility settings for non-admin users.
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow admins to override restricted visibility</title>
<updated>2015-03-08T22:10:05+00:00</updated>
<author>
<name>Vinnie Okada</name>
<email>vokada@mrvinn.com</email>
</author>
<published>2015-03-07T18:23:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=285c5341855f8af6cbea5e964e3104a4698fa450'/>
<id>285c5341855f8af6cbea5e964e3104a4698fa450</id>
<content type='text'>
Allow admins to use restricted visibility levels when creating or
updating projects.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow admins to use restricted visibility levels when creating or
updating projects.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'autocomplete-mention-count' into 'master'</title>
<updated>2015-02-27T07:08:23+00:00</updated>
<author>
<name>Dmitriy Zaporozhets</name>
<email>dzaporozhets@gitlab.com</email>
</author>
<published>2015-02-27T07:08:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=47c5a2ab22b0fbc9c20b996ec24c27608e99bc43'/>
<id>47c5a2ab22b0fbc9c20b996ec24c27608e99bc43</id>
<content type='text'>
Include number of affected people in all/group mention autocomplete item.

As mentioned in #2054.

To minimize misuse of all/group mentions, the autocomplete title includes the number of members this mention will notify, so users will be more considerate what groups they mention.

Example:

at-all "**all** All Project and Group Members (12)"

at-gitlab "**gitlab** GitLab (12)"

See merge request !1596
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Include number of affected people in all/group mention autocomplete item.

As mentioned in #2054.

To minimize misuse of all/group mentions, the autocomplete title includes the number of members this mention will notify, so users will be more considerate what groups they mention.

Example:

at-all "**all** All Project and Group Members (12)"

at-gitlab "**gitlab** GitLab (12)"

See merge request !1596
</pre>
</div>
</content>
</entry>
<entry>
<title>Include number of affected people in all/group mention autocomplete item.</title>
<updated>2015-02-25T16:34:01+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2015-02-25T16:34:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=a672b4688309dc356922bd3f9c61b8ae9de018f8'/>
<id>a672b4688309dc356922bd3f9c61b8ae9de018f8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'master' into extend_markdown_upload</title>
<updated>2015-02-24T13:54:39+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2015-02-24T13:54:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=0283fff5914f74d9435ab2097b2770dfdf635941'/>
<id>0283fff5914f74d9435ab2097b2770dfdf635941</id>
<content type='text'>
# Conflicts:
#	app/views/projects/issues/_form.html.haml
#	app/views/projects/merge_requests/_form.html.haml
#	app/views/projects/merge_requests/_new_submit.html.haml
#	app/views/projects/milestones/_form.html.haml
#	app/views/projects/notes/_form.html.haml
#	app/views/projects/wikis/_form.html.haml
#	config/routes.rb
#	spec/controllers/projects_controller_spec.rb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
# Conflicts:
#	app/views/projects/issues/_form.html.haml
#	app/views/projects/merge_requests/_form.html.haml
#	app/views/projects/merge_requests/_new_submit.html.haml
#	app/views/projects/milestones/_form.html.haml
#	app/views/projects/notes/_form.html.haml
#	app/views/projects/wikis/_form.html.haml
#	config/routes.rb
#	spec/controllers/projects_controller_spec.rb
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix URL to uploaded file.</title>
<updated>2015-02-20T15:01:37+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2015-02-20T14:56:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=7f1adc3d9cdc5c3f1c0fcbf6c72d89b8ee062af5'/>
<id>7f1adc3d9cdc5c3f1c0fcbf6c72d89b8ee062af5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
