I realize this has already been merged, but I need to comment. :-)
> === modified file 'lava_scheduler_app/models.py'
> --- lava_scheduler_app/models.py 2013-02-10 21:26:06 +0000
> +++ lava_scheduler_app/models.py 2013-06-24 09:24:26 +0000
> @@ -477,7 +477,10 @@
> """ used to check for things like if the user can cancel or annotate
> a job failure
> """
> - return user.is_superuser or user == self.submitter
> + ci_admin_groups = ['builds', 'baselines']
> + return (user.is_superuser or user == self.submitter or
> + ('ciadmin' == self.submitter.username and
> + user.groups.filter(name__in=ci_admin_groups).exists()))
Maybe we could instead add an attribute to groups that says whether a
group can manage jobs and then check for that being True here, instead
of hardcoding group names in the code like this.
I realize this has already been merged, but I need to comment. :-)
> === modified file 'lava_scheduler _app/models. py' app/models. py 2013-02-10 21:26:06 +0000 app/models. py 2013-06-24 09:24:26 +0000 username and filter( name__in= ci_admin_ groups) .exists( )))
> --- lava_scheduler_
> +++ lava_scheduler_
> @@ -477,7 +477,10 @@
> """ used to check for things like if the user can cancel or annotate
> a job failure
> """
> - return user.is_superuser or user == self.submitter
> + ci_admin_groups = ['builds', 'baselines']
> + return (user.is_superuser or user == self.submitter or
> + ('ciadmin' == self.submitter.
> + user.groups.
Maybe we could instead add an attribute to groups that says whether a
group can manage jobs and then check for that being True here, instead
of hardcoding group names in the code like this.
-- www.linaro. org
Antonio Terceiro
Software Engineer - Linaro
http://