We must check repository permissions before parsing args.

This commit is contained in:
jakedt 2014-03-18 14:45:14 -04:00
parent 7d163833bd
commit e1b704bdac

View file

@ -226,9 +226,9 @@ class ActivateBuildTrigger(RepositoryParamResource):
@resource('/v1/repository/<path:repository>/trigger/<trigger_uuid>/builds')
class TriggerBuildList(RepositoryParamResource):
""" Resource to represent builds that were activated from the specified trigger. """
@require_repo_admin
@parse_args
@query_param('limit', 'The maximum number of builds to return', type=int, default=5)
@require_repo_admin
@nickname('listTriggerRecentBuilds')
def get(self, args, namespace, repository, trigger_uuid):
""" List the builds started by the specified trigger. """