Merge pull request #316 from jzelinskie/read-tags

tag history requires READ instead of WRITE
This commit is contained in:
Jimmy Zelinskie 2015-08-07 13:26:04 -04:00
commit 7d6c6ba8e8
2 changed files with 7 additions and 7 deletions

View file

@ -15,7 +15,7 @@ from auth.auth_context import get_authenticated_user
class ListRepositoryTags(RepositoryParamResource):
""" Resource for listing full repository tag history, alive *and dead*. """
@require_repo_write
@require_repo_read
@parse_args
@query_param('specificTag', 'Filters the tags to the specific tag.', type=str, default='')
@query_param('limit', 'Limit to the number of results to return per page. Max 100.', type=int, default=50)

View file

@ -1831,16 +1831,16 @@ class TestListRepositoryTagsTn96PublicPublicrepo(ApiTestCase):
self._set_url(ListRepositoryTags, tag="TN96", repository="public/publicrepo")
def test_get_anonymous(self):
self._run_test('GET', 401, None, None)
self._run_test('GET', 200, None, None)
def test_get_freshuser(self):
self._run_test('GET', 403, 'freshuser', None)
self._run_test('GET', 200, 'freshuser', None)
def test_get_reader(self):
self._run_test('GET', 403, 'reader', None)
self._run_test('GET', 200, 'reader', None)
def test_get_devtable(self):
self._run_test('GET', 403, 'devtable', None)
self._run_test('GET', 200, 'devtable', None)
class TestListRepositoryTagsTn96DevtableShared(ApiTestCase):
@ -1855,7 +1855,7 @@ class TestListRepositoryTagsTn96DevtableShared(ApiTestCase):
self._run_test('GET', 403, 'freshuser', None)
def test_get_reader(self):
self._run_test('GET', 403, 'reader', None)
self._run_test('GET', 200, 'reader', None)
def test_get_devtable(self):
self._run_test('GET', 200, 'devtable', None)
@ -1873,7 +1873,7 @@ class TestListRepositoryTagsTn96BuynlargeOrgrepo(ApiTestCase):
self._run_test('GET', 403, 'freshuser', None)
def test_get_reader(self):
self._run_test('GET', 403, 'reader', None)
self._run_test('GET', 200, 'reader', None)
def test_get_devtable(self):
self._run_test('GET', 200, 'devtable', None)