diff options
author | 2006-09-04 23:21:47 +0000 | |
---|---|---|
committer | 2006-09-04 23:21:47 +0000 | |
commit | 7d677ece7d55266f63924bc64cf2190df7c785a0 (patch) | |
tree | 7b666d17b8e5de6a8d1cd86c8a33030073acb9ef /chart.cgi | |
parent | Bug 349741: Make Bugzilla::Bug able to do basic bug creation, and have post_b... (diff) | |
download | bugzilla-7d677ece7d55266f63924bc64cf2190df7c785a0.tar.gz bugzilla-7d677ece7d55266f63924bc64cf2190df7c785a0.tar.bz2 bugzilla-7d677ece7d55266f63924bc64cf2190df7c785a0.zip |
Bug 283582: Remove UserInGroup in favor of Bugzilla->user->in_group
Patch By victory(_RSZ_) <bmo2007@rsz.jp> r=mkanat, a=myk
Diffstat (limited to 'chart.cgi')
-rwxr-xr-x | chart.cgi | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -35,8 +35,8 @@ # # JS-less chart creation - hard. # Broken image on error or no data - need to do much better. -# Centralise permission checking, so UserInGroup('editbugs') not scattered -# everywhere. +# Centralise permission checking, so Bugzilla->user->in_group('editbugs') +# not scattered everywhere. # User documentation :-) # # Bonus: @@ -93,13 +93,13 @@ if ($action eq "search") { my $user = Bugzilla->login(LOGIN_REQUIRED); -UserInGroup(Bugzilla->params->{"chartgroup"}) +Bugzilla->user->in_group(Bugzilla->params->{"chartgroup"}) || ThrowUserError("auth_failure", {group => Bugzilla->params->{"chartgroup"}, action => "use", object => "charts"}); # Only admins may create public queries -UserInGroup('admin') || $cgi->delete('public'); +Bugzilla->user->in_group('admin') || $cgi->delete('public'); # All these actions relate to chart construction. if ($action =~ /^(assemble|add|remove|sum|subscribe|unsubscribe)$/) { @@ -224,11 +224,11 @@ sub assertCanEdit { sub assertCanCreate { my ($cgi) = shift; - UserInGroup("editbugs") || ThrowUserError("illegal_series_creation"); + Bugzilla->user->in_group("editbugs") || ThrowUserError("illegal_series_creation"); # Check permission for frequency my $min_freq = 7; - if ($cgi->param('frequency') < $min_freq && !UserInGroup("admin")) { + if ($cgi->param('frequency') < $min_freq && !Bugzilla->user->in_group("admin")) { ThrowUserError("illegal_frequency", { 'minimum' => $min_freq }); } } |