<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/spec/services, branch api-internal-errors</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>Extend push_tag event to include tag message and last commit</title>
<updated>2015-03-21T10:25:27+00:00</updated>
<author>
<name>Kamil Trzcinski</name>
<email>ayufan@ayufan.eu</email>
</author>
<published>2014-12-05T21:56:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=5b432e76710eb70cc41c59af1ea9a294202a49fc'/>
<id>5b432e76710eb70cc41c59af1ea9a294202a49fc</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 'issue_subscription' into 'master'</title>
<updated>2015-03-17T16:45:04+00:00</updated>
<author>
<name>Dmitriy Zaporozhets</name>
<email>dzaporozhets@gitlab.com</email>
</author>
<published>2015-03-17T16:45:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=9162e34bb078be9f4fb35b7e43f89c926dc3bcd8'/>
<id>9162e34bb078be9f4fb35b7e43f89c926dc3bcd8</id>
<content type='text'>
Subscription to issue/mr

Fixes #1911 and #1909

![joxi_screenshot_1426601822159](https://dev.gitlab.org/gitlab/gitlabhq/uploads/53021bc5783271322ab2dfba7598eaa3/joxi_screenshot_1426601822159.png)

![joxi_screenshot_1426601836423](https://dev.gitlab.org/gitlab/gitlabhq/uploads/244ff360fbd6f30980f8dad699400814/joxi_screenshot_1426601836423.png)

See merge request !1702
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Subscription to issue/mr

Fixes #1911 and #1909

![joxi_screenshot_1426601822159](https://dev.gitlab.org/gitlab/gitlabhq/uploads/53021bc5783271322ab2dfba7598eaa3/joxi_screenshot_1426601822159.png)

![joxi_screenshot_1426601836423](https://dev.gitlab.org/gitlab/gitlabhq/uploads/244ff360fbd6f30980f8dad699400814/joxi_screenshot_1426601836423.png)

See merge request !1702
</pre>
</div>
</content>
</entry>
<entry>
<title>tests</title>
<updated>2015-03-16T19:38:41+00:00</updated>
<author>
<name>Valery Sizov</name>
<email>vsv2711@gmail.com</email>
</author>
<published>2015-03-16T15:20:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=1b437ec3498bc544dbd1b252f5c755e9073407fd'/>
<id>1b437ec3498bc544dbd1b252f5c755e9073407fd</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 `group_member` instead of `users_group` or `membership`.</title>
<updated>2015-03-15T12:49:41+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2015-03-13T15:16:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=99f995755ef4b445216dd7baae35f5a4846ef30c'/>
<id>99f995755ef4b445216dd7baae35f5a4846ef30c</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 fix-restricted-visibility</title>
<updated>2015-03-14T16:49:11+00:00</updated>
<author>
<name>Vinnie Okada</name>
<email>vokada@mrvinn.com</email>
</author>
<published>2015-03-14T16:49:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ad0ca0499ac81c68e9e8011d2e194b16c759c1d6'/>
<id>ad0ca0499ac81c68e9e8011d2e194b16c759c1d6</id>
<content type='text'>
Conflicts:
	db/schema.rb
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	db/schema.rb
</pre>
</div>
</content>
</entry>
<entry>
<title>Add tests for snippet services</title>
<updated>2015-03-14T16:33:02+00:00</updated>
<author>
<name>Vinnie Okada</name>
<email>vokada@mrvinn.com</email>
</author>
<published>2015-03-14T16:33:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=13e9f4f33420bf0bae0b61b98dd3c2301d6f6223'/>
<id>13e9f4f33420bf0bae0b61b98dd3c2301d6f6223</id>
<content type='text'>
Add Rspec tests for the new UpdateSnippetService and
CreateSnippetService classes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add Rspec tests for the new UpdateSnippetService and
CreateSnippetService classes.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix mass SQL statements on initial push</title>
<updated>2015-03-09T11:52:45+00:00</updated>
<author>
<name>Hannes Rosenögger</name>
<email>123haynes@gmail.com</email>
</author>
<published>2015-03-09T11:52:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=224e104d8dc79e081fd897a1e52799dc1a0082bb'/>
<id>224e104d8dc79e081fd897a1e52799dc1a0082bb</id>
<content type='text'>
This commit disables process_commit_messages()
for the initial push to the default branch.
This fixes the mass SQL statements (~500000) that were executed during
the initial push of the linux kernel for example.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This commit disables process_commit_messages()
for the initial push to the default branch.
This fixes the mass SQL statements (~500000) that were executed during
the initial push of the linux kernel for example.
</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 'mass-change-comments' into 'master'</title>
<updated>2015-03-07T01:06:44+00:00</updated>
<author>
<name>Dmitriy Zaporozhets</name>
<email>dzaporozhets@gitlab.com</email>
</author>
<published>2015-03-07T01:06:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=3cf4359b00d13959741e8c4909112c21b021c86c'/>
<id>3cf4359b00d13959741e8c4909112c21b021c86c</id>
<content type='text'>
Send notifications and leave system comments when bulk updating issues.

Resolves https://dev.gitlab.org/gitlab/gitlabhq/issues/1885.

See merge request !1646
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Send notifications and leave system comments when bulk updating issues.

Resolves https://dev.gitlab.org/gitlab/gitlabhq/issues/1885.

See merge request !1646
</pre>
</div>
</content>
</entry>
</feed>
