Commit 7d677ece authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 283582: Remove UserInGroup in favor of Bugzilla->user->in_group

Patch By victory(_RSZ_) <bmo2007@rsz.jp> r=mkanat, a=myk
parent b63fd277
...@@ -1266,7 +1266,7 @@ sub GetBugActivity { ...@@ -1266,7 +1266,7 @@ sub GetBugActivity {
my $suppjoins = ""; my $suppjoins = "";
my $suppwhere = ""; my $suppwhere = "";
if (Bugzilla->params->{"insidergroup"} if (Bugzilla->params->{"insidergroup"}
&& !UserInGroup(Bugzilla->params->{'insidergroup'})) && !Bugzilla->user->in_group(Bugzilla->params->{'insidergroup'}))
{ {
$suppjoins = "LEFT JOIN attachments $suppjoins = "LEFT JOIN attachments
ON attachments.attach_id = bugs_activity.attach_id"; ON attachments.attach_id = bugs_activity.attach_id";
...@@ -1313,7 +1313,7 @@ sub GetBugActivity { ...@@ -1313,7 +1313,7 @@ sub GetBugActivity {
|| $fieldname eq 'deadline') || $fieldname eq 'deadline')
{ {
$activity_visible = $activity_visible =
UserInGroup(Bugzilla->params->{'timetrackinggroup'}) ? 1 : 0; Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'}) ? 1 : 0;
} else { } else {
$activity_visible = 1; $activity_visible = 1;
} }
......
...@@ -578,7 +578,7 @@ sub init { ...@@ -578,7 +578,7 @@ sub init {
my $table = "longdescs_$chartid"; my $table = "longdescs_$chartid";
my $extra = ""; my $extra = "";
if (Bugzilla->params->{"insidergroup"} if (Bugzilla->params->{"insidergroup"}
&& !UserInGroup(Bugzilla->params->{"insidergroup"})) && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{ {
$extra = "AND $table.isprivate < 1"; $extra = "AND $table.isprivate < 1";
} }
...@@ -641,7 +641,7 @@ sub init { ...@@ -641,7 +641,7 @@ sub init {
my $table = "longdescs_$chartseq"; my $table = "longdescs_$chartseq";
my $extra = ""; my $extra = "";
if (Bugzilla->params->{"insidergroup"} if (Bugzilla->params->{"insidergroup"}
&& !UserInGroup(Bugzilla->params->{"insidergroup"})) && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{ {
$extra = "AND $table.isprivate < 1"; $extra = "AND $table.isprivate < 1";
} }
...@@ -661,7 +661,7 @@ sub init { ...@@ -661,7 +661,7 @@ sub init {
my $table = "longdescs_$chartseq"; my $table = "longdescs_$chartseq";
my $extra = ""; my $extra = "";
if (Bugzilla->params->{"insidergroup"} if (Bugzilla->params->{"insidergroup"}
&& !UserInGroup(Bugzilla->params->{"insidergroup"})) && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{ {
$extra = "AND $table.isprivate < 1"; $extra = "AND $table.isprivate < 1";
} }
...@@ -684,7 +684,7 @@ sub init { ...@@ -684,7 +684,7 @@ sub init {
my $table = "longdescs_$chartid"; my $table = "longdescs_$chartid";
my $extra = ""; my $extra = "";
if (Bugzilla->params->{"insidergroup"} if (Bugzilla->params->{"insidergroup"}
&& !UserInGroup(Bugzilla->params->{"insidergroup"})) && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{ {
$extra = "AND $table.isprivate < 1"; $extra = "AND $table.isprivate < 1";
} }
...@@ -793,7 +793,7 @@ sub init { ...@@ -793,7 +793,7 @@ sub init {
my $dtable = "attachdata_$chartid"; my $dtable = "attachdata_$chartid";
my $extra = ""; my $extra = "";
if (Bugzilla->params->{"insidergroup"} if (Bugzilla->params->{"insidergroup"}
&& !UserInGroup(Bugzilla->params->{"insidergroup"})) && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{ {
$extra = "AND $atable.isprivate = 0"; $extra = "AND $atable.isprivate = 0";
} }
...@@ -807,7 +807,7 @@ sub init { ...@@ -807,7 +807,7 @@ sub init {
my $table = "attachments_$chartid"; my $table = "attachments_$chartid";
my $extra = ""; my $extra = "";
if (Bugzilla->params->{"insidergroup"} if (Bugzilla->params->{"insidergroup"}
&& !UserInGroup(Bugzilla->params->{"insidergroup"})) && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{ {
$extra = "AND $table.isprivate = 0"; $extra = "AND $table.isprivate = 0";
} }
......
...@@ -164,7 +164,7 @@ sub initFromCGI { ...@@ -164,7 +164,7 @@ sub initFromCGI {
# Change 'admin' here and in series.html.tmpl, or remove the check # Change 'admin' here and in series.html.tmpl, or remove the check
# completely, if you want to change who can make series public. # completely, if you want to change who can make series public.
$self->{'public'} = 0 unless UserInGroup('admin'); $self->{'public'} = 0 unless Bugzilla->user->in_group('admin');
} }
sub writeToDatabase { sub writeToDatabase {
......
...@@ -790,9 +790,6 @@ sub create { ...@@ -790,9 +790,6 @@ sub create {
# started the session. # started the session.
'sudoer' => sub { return Bugzilla->sudoer; }, 'sudoer' => sub { return Bugzilla->sudoer; },
# UserInGroup. Deprecated - use the user.* functions instead
'UserInGroup' => \&Bugzilla::User::UserInGroup,
# SendBugMail - sends mail about a bug, using Bugzilla::BugMail.pm # SendBugMail - sends mail about a bug, using Bugzilla::BugMail.pm
'SendBugMail' => sub { 'SendBugMail' => sub {
my ($id, $mailrecipients) = (@_); my ($id, $mailrecipients) = (@_);
......
...@@ -51,7 +51,6 @@ use Bugzilla::Field; ...@@ -51,7 +51,6 @@ use Bugzilla::Field;
use base qw(Bugzilla::Object Exporter); use base qw(Bugzilla::Object Exporter);
@Bugzilla::User::EXPORT = qw(is_available_username @Bugzilla::User::EXPORT = qw(is_available_username
login_to_id user_id_to_login validate_password login_to_id user_id_to_login validate_password
UserInGroup
USER_MATCH_MULTIPLE USER_MATCH_FAILED USER_MATCH_SUCCESS USER_MATCH_MULTIPLE USER_MATCH_FAILED USER_MATCH_SUCCESS
MATCH_SKIP_CONFIRM MATCH_SKIP_CONFIRM
); );
...@@ -1471,9 +1470,6 @@ sub validate_password { ...@@ -1471,9 +1470,6 @@ sub validate_password {
return 1; return 1;
} }
sub UserInGroup {
return exists Bugzilla->user->groups->{$_[0]} ? 1 : 0;
}
1; 1;
...@@ -1893,10 +1889,6 @@ requirements for length and content), else returns false. ...@@ -1893,10 +1889,6 @@ requirements for length and content), else returns false.
If a second password is passed in, this function also verifies that If a second password is passed in, this function also verifies that
the two passwords match. the two passwords match.
=item C<UserInGroup($groupname)>
Takes a name of a group, and returns 1 if a user is in the group, 0 otherwise.
=back =back
=head1 SEE ALSO =head1 SEE ALSO
......
...@@ -170,7 +170,7 @@ sub validateID ...@@ -170,7 +170,7 @@ sub validateID
ValidateBugID($bugid); ValidateBugID($bugid);
if ($isprivate && Bugzilla->params->{"insidergroup"}) { if ($isprivate && Bugzilla->params->{"insidergroup"}) {
UserInGroup(Bugzilla->params->{"insidergroup"}) Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"})
|| ThrowUserError("auth_failure", {action => "access", || ThrowUserError("auth_failure", {action => "access",
object => "attachment"}); object => "attachment"});
} }
...@@ -398,7 +398,7 @@ sub viewall ...@@ -398,7 +398,7 @@ sub viewall
my $dbh = Bugzilla->dbh; my $dbh = Bugzilla->dbh;
if ( Bugzilla->params->{"insidergroup"} if ( Bugzilla->params->{"insidergroup"}
&& !UserInGroup(Bugzilla->params->{"insidergroup"}) ) && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}) )
{ {
$privacy = "AND isprivate < 1 "; $privacy = "AND isprivate < 1 ";
} }
...@@ -450,7 +450,7 @@ sub enter ...@@ -450,7 +450,7 @@ sub enter
# Retrieve the attachments the user can edit from the database and write # Retrieve the attachments the user can edit from the database and write
# them into an array of hashes where each hash represents one attachment. # them into an array of hashes where each hash represents one attachment.
my $canEdit = ""; my $canEdit = "";
if (!UserInGroup("editbugs")) { if (!Bugzilla->user->in_group("editbugs")) {
$canEdit = "AND submitter_id = " . Bugzilla->user->id; $canEdit = "AND submitter_id = " . Bugzilla->user->id;
} }
my $attachments = $dbh->selectall_arrayref( my $attachments = $dbh->selectall_arrayref(
...@@ -517,7 +517,7 @@ sub insert ...@@ -517,7 +517,7 @@ sub insert
# Assign the bug to the user, if they are allowed to take it # Assign the bug to the user, if they are allowed to take it
my $owner = ""; my $owner = "";
if ($cgi->param('takebug') && UserInGroup("editbugs")) { if ($cgi->param('takebug') && Bugzilla->user->in_group("editbugs")) {
my @fields = ("assigned_to", "bug_status", "resolution", "everconfirmed", my @fields = ("assigned_to", "bug_status", "resolution", "everconfirmed",
"login_name"); "login_name");
......
...@@ -83,7 +83,7 @@ my $dotweak = $cgi->param('tweak') ? 1 : 0; ...@@ -83,7 +83,7 @@ my $dotweak = $cgi->param('tweak') ? 1 : 0;
# Log the user in # Log the user in
if ($dotweak) { if ($dotweak) {
Bugzilla->login(LOGIN_REQUIRED); Bugzilla->login(LOGIN_REQUIRED);
UserInGroup("editbugs") Bugzilla->user->in_group("editbugs")
|| ThrowUserError("auth_failure", {group => "editbugs", || ThrowUserError("auth_failure", {group => "editbugs",
action => "modify", action => "modify",
object => "multiple_bugs"}); object => "multiple_bugs"});
...@@ -717,7 +717,7 @@ if (trim($votes) && !grep($_ eq 'votes', @displaycolumns)) { ...@@ -717,7 +717,7 @@ if (trim($votes) && !grep($_ eq 'votes', @displaycolumns)) {
# Remove the timetracking columns if they are not a part of the group # Remove the timetracking columns if they are not a part of the group
# (happens if a user had access to time tracking and it was revoked/disabled) # (happens if a user had access to time tracking and it was revoked/disabled)
if (!UserInGroup(Bugzilla->params->{"timetrackinggroup"})) { if (!Bugzilla->user->in_group(Bugzilla->params->{"timetrackinggroup"})) {
@displaycolumns = grep($_ ne 'estimated_time', @displaycolumns); @displaycolumns = grep($_ ne 'estimated_time', @displaycolumns);
@displaycolumns = grep($_ ne 'remaining_time', @displaycolumns); @displaycolumns = grep($_ ne 'remaining_time', @displaycolumns);
@displaycolumns = grep($_ ne 'actual_time', @displaycolumns); @displaycolumns = grep($_ ne 'actual_time', @displaycolumns);
...@@ -1107,10 +1107,10 @@ $vars->{'urlquerypart'} = $params->canonicalise_query('order', ...@@ -1107,10 +1107,10 @@ $vars->{'urlquerypart'} = $params->canonicalise_query('order',
'cmdtype', 'cmdtype',
'query_based_on'); 'query_based_on');
$vars->{'order'} = $order; $vars->{'order'} = $order;
$vars->{'caneditbugs'} = UserInGroup('editbugs'); $vars->{'caneditbugs'} = Bugzilla->user->in_group('editbugs');
my @bugowners = keys %$bugowners; my @bugowners = keys %$bugowners;
if (scalar(@bugowners) > 1 && UserInGroup('editbugs')) { if (scalar(@bugowners) > 1 && Bugzilla->user->in_group('editbugs')) {
my $suffix = Bugzilla->params->{'emailsuffix'}; my $suffix = Bugzilla->params->{'emailsuffix'};
map(s/$/$suffix/, @bugowners) if $suffix; map(s/$/$suffix/, @bugowners) if $suffix;
my $bugowners = join(",", @bugowners); my $bugowners = join(",", @bugowners);
......
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
# #
# JS-less chart creation - hard. # JS-less chart creation - hard.
# Broken image on error or no data - need to do much better. # Broken image on error or no data - need to do much better.
# Centralise permission checking, so UserInGroup('editbugs') not scattered # Centralise permission checking, so Bugzilla->user->in_group('editbugs')
# everywhere. # not scattered everywhere.
# User documentation :-) # User documentation :-)
# #
# Bonus: # Bonus:
...@@ -93,13 +93,13 @@ if ($action eq "search") { ...@@ -93,13 +93,13 @@ if ($action eq "search") {
my $user = Bugzilla->login(LOGIN_REQUIRED); my $user = Bugzilla->login(LOGIN_REQUIRED);
UserInGroup(Bugzilla->params->{"chartgroup"}) Bugzilla->user->in_group(Bugzilla->params->{"chartgroup"})
|| ThrowUserError("auth_failure", {group => Bugzilla->params->{"chartgroup"}, || ThrowUserError("auth_failure", {group => Bugzilla->params->{"chartgroup"},
action => "use", action => "use",
object => "charts"}); object => "charts"});
# Only admins may create public queries # 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. # All these actions relate to chart construction.
if ($action =~ /^(assemble|add|remove|sum|subscribe|unsubscribe)$/) { if ($action =~ /^(assemble|add|remove|sum|subscribe|unsubscribe)$/) {
...@@ -224,11 +224,11 @@ sub assertCanEdit { ...@@ -224,11 +224,11 @@ sub assertCanEdit {
sub assertCanCreate { sub assertCanCreate {
my ($cgi) = shift; my ($cgi) = shift;
UserInGroup("editbugs") || ThrowUserError("illegal_series_creation"); Bugzilla->user->in_group("editbugs") || ThrowUserError("illegal_series_creation");
# Check permission for frequency # Check permission for frequency
my $min_freq = 7; 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 }); ThrowUserError("illegal_frequency", { 'minimum' => $min_freq });
} }
} }
......
...@@ -71,7 +71,7 @@ if (Bugzilla::Keyword::keyword_count()) { ...@@ -71,7 +71,7 @@ if (Bugzilla::Keyword::keyword_count()) {
push(@masterlist, "keywords"); push(@masterlist, "keywords");
} }
if (UserInGroup(Bugzilla->params->{"timetrackinggroup"})) { if (Bugzilla->user->in_group(Bugzilla->params->{"timetrackinggroup"})) {
push(@masterlist, ("estimated_time", "remaining_time", "actual_time", push(@masterlist, ("estimated_time", "remaining_time", "actual_time",
"percentage_complete", "deadline")); "percentage_complete", "deadline"));
} }
......
...@@ -36,7 +36,7 @@ my $template = Bugzilla->template; ...@@ -36,7 +36,7 @@ my $template = Bugzilla->template;
my $vars = {}; my $vars = {};
$vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count(); $vars->{'keywords'} = Bugzilla::Keyword->get_all_with_bug_count();
$vars->{'caneditkeywords'} = UserInGroup("editkeywords"); $vars->{'caneditkeywords'} = Bugzilla->user->in_group("editkeywords");
print Bugzilla->cgi->header(); print Bugzilla->cgi->header();
$template->process("reports/keywords.html.tmpl", $vars) $template->process("reports/keywords.html.tmpl", $vars)
......
...@@ -409,7 +409,7 @@ if ($action eq 'search') { ...@@ -409,7 +409,7 @@ if ($action eq 'search') {
action => "delete", action => "delete",
object => "users"}); object => "users"});
$vars->{'otheruser'} = $otherUser; $vars->{'otheruser'} = $otherUser;
$vars->{'editcomponents'} = UserInGroup('editcomponents'); $vars->{'editcomponents'} = Bugzilla->user->in_group('editcomponents');
# Find other cross references. # Find other cross references.
$vars->{'assignee_or_qa'} = $dbh->selectrow_array( $vars->{'assignee_or_qa'} = $dbh->selectrow_array(
......
...@@ -80,7 +80,7 @@ $user->in_group('bz_canusewhines') ...@@ -80,7 +80,7 @@ $user->in_group('bz_canusewhines')
object => "reports"}); object => "reports"});
# May this user send mail to other users? # May this user send mail to other users?
my $can_mail_others = UserInGroup('bz_canusewhineatothers'); my $can_mail_others = Bugzilla->user->in_group('bz_canusewhineatothers');
# If the form was submitted, we need to look for what needs to be added or # If the form was submitted, we need to look for what needs to be added or
# removed, then what was altered. # removed, then what was altered.
......
...@@ -327,11 +327,11 @@ $vars->{'op_sys'} = get_legal_field_values('op_sys'); ...@@ -327,11 +327,11 @@ $vars->{'op_sys'} = get_legal_field_values('op_sys');
$vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count(); $vars->{'use_keywords'} = 1 if Bugzilla::Keyword::keyword_count();
$vars->{'assigned_to'} = formvalue('assigned_to'); $vars->{'assigned_to'} = formvalue('assigned_to');
$vars->{'assigned_to_disabled'} = !UserInGroup('editbugs'); $vars->{'assigned_to_disabled'} = !Bugzilla->user->in_group('editbugs');
$vars->{'cc_disabled'} = 0; $vars->{'cc_disabled'} = 0;
$vars->{'qa_contact'} = formvalue('qa_contact'); $vars->{'qa_contact'} = formvalue('qa_contact');
$vars->{'qa_contact_disabled'} = !UserInGroup('editbugs'); $vars->{'qa_contact_disabled'} = !Bugzilla->user->in_group('editbugs');
$vars->{'cloned_bug_id'} = $cloned_bug_id; $vars->{'cloned_bug_id'} = $cloned_bug_id;
...@@ -381,7 +381,7 @@ if ($cloned_bug_id) { ...@@ -381,7 +381,7 @@ if ($cloned_bug_id) {
if ( !($isprivate) || if ( !($isprivate) ||
( ( Bugzilla->params->{"insidergroup"} ) && ( ( Bugzilla->params->{"insidergroup"} ) &&
( UserInGroup(Bugzilla->params->{"insidergroup"}) ) ) ( Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}) ) )
) { ) {
$vars->{'comment'} = $cloned_bug->{'longdescs'}->[0]->{'body'}; $vars->{'comment'} = $cloned_bug->{'longdescs'}->[0]->{'body'};
$vars->{'commentprivacy'} = $isprivate; $vars->{'commentprivacy'} = $isprivate;
...@@ -505,7 +505,7 @@ foreach my $row (@$grouplist) { ...@@ -505,7 +505,7 @@ foreach my $row (@$grouplist) {
|| ($membercontrol == CONTROLMAPMANDATORY) || ($membercontrol == CONTROLMAPMANDATORY)
|| (($othercontrol != CONTROLMAPSHOWN) || (($othercontrol != CONTROLMAPSHOWN)
&& ($othercontrol != CONTROLMAPDEFAULT) && ($othercontrol != CONTROLMAPDEFAULT)
&& (!UserInGroup($groupname))) && (!Bugzilla->user->in_group($groupname)))
); );
my $check; my $check;
...@@ -532,7 +532,7 @@ foreach my $row (@$grouplist) { ...@@ -532,7 +532,7 @@ foreach my $row (@$grouplist) {
# Checkbox is checked by default if $control is a default state. # Checkbox is checked by default if $control is a default state.
$check = (($membercontrol == CONTROLMAPDEFAULT) $check = (($membercontrol == CONTROLMAPDEFAULT)
|| (($othercontrol == CONTROLMAPDEFAULT) || (($othercontrol == CONTROLMAPDEFAULT)
&& (!UserInGroup($groupname)))); && (!Bugzilla->user->in_group($groupname))));
} }
my $group = my $group =
......
...@@ -217,7 +217,7 @@ foreach my $group (@$groups) { ...@@ -217,7 +217,7 @@ foreach my $group (@$groups) {
# Add groups required # Add groups required
if (($membercontrol == CONTROLMAPMANDATORY) if (($membercontrol == CONTROLMAPMANDATORY)
|| (($othercontrol == CONTROLMAPMANDATORY) || (($othercontrol == CONTROLMAPMANDATORY)
&& (!UserInGroup($groupname)))) { && (!Bugzilla->user->in_group($groupname)))) {
# User had no option, bug needs to be in this group. # User had no option, bug needs to be in this group.
push(@groupstoadd, $id) push(@groupstoadd, $id)
} }
...@@ -278,7 +278,7 @@ foreach my $grouptoadd (@groupstoadd) { ...@@ -278,7 +278,7 @@ foreach my $grouptoadd (@groupstoadd) {
# Add the initial comment, allowing for the fact that it may be private # Add the initial comment, allowing for the fact that it may be private
my $privacy = 0; my $privacy = 0;
if (Bugzilla->params->{"insidergroup"} if (Bugzilla->params->{"insidergroup"}
&& UserInGroup(Bugzilla->params->{"insidergroup"})) && Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{ {
$privacy = $cgi->param('commentprivacy') ? 1 : 0; $privacy = $cgi->param('commentprivacy') ? 1 : 0;
} }
...@@ -297,7 +297,7 @@ foreach my $ccid (@$cc_ids) { ...@@ -297,7 +297,7 @@ foreach my $ccid (@$cc_ids) {
my @all_deps; my @all_deps;
my $sth_addkeyword = $dbh->prepare(q{ my $sth_addkeyword = $dbh->prepare(q{
INSERT INTO keywords (bug_id, keywordid) VALUES (?, ?)}); INSERT INTO keywords (bug_id, keywordid) VALUES (?, ?)});
if (UserInGroup("editbugs")) { if (Bugzilla->user->in_group("editbugs")) {
foreach my $keyword (@keyword_ids) { foreach my $keyword (@keyword_ids) {
$sth_addkeyword->execute($id, $keyword); $sth_addkeyword->execute($id, $keyword);
} }
......
...@@ -156,7 +156,7 @@ foreach my $field ("estimated_time", "work_time", "remaining_time") { ...@@ -156,7 +156,7 @@ foreach my $field ("estimated_time", "work_time", "remaining_time") {
} }
} }
if (UserInGroup(Bugzilla->params->{'timetrackinggroup'})) { if (Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'})) {
my $wk_time = $cgi->param('work_time'); my $wk_time = $cgi->param('work_time');
if ($cgi->param('comment') =~ /^\s*$/ && $wk_time && $wk_time != 0) { if ($cgi->param('comment') =~ /^\s*$/ && $wk_time && $wk_time != 0) {
ThrowUserError('comment_required'); ThrowUserError('comment_required');
...@@ -592,7 +592,7 @@ umask(0); ...@@ -592,7 +592,7 @@ umask(0);
sub _remove_remaining_time { sub _remove_remaining_time {
my $cgi = Bugzilla->cgi; my $cgi = Bugzilla->cgi;
if (UserInGroup(Bugzilla->params->{'timetrackinggroup'})) { if (Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'})) {
if ( defined $cgi->param('remaining_time') if ( defined $cgi->param('remaining_time')
&& $cgi->param('remaining_time') > 0 ) && $cgi->param('remaining_time') > 0 )
{ {
...@@ -875,7 +875,7 @@ if (defined $cgi->param('id')) { ...@@ -875,7 +875,7 @@ if (defined $cgi->param('id')) {
if ( defined $cgi->param('id') && if ( defined $cgi->param('id') &&
(Bugzilla->params->{"insidergroup"} (Bugzilla->params->{"insidergroup"}
&& UserInGroup(Bugzilla->params->{"insidergroup"})) ) && Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"})) )
{ {
my $sth = $dbh->prepare('UPDATE longdescs SET isprivate = ? my $sth = $dbh->prepare('UPDATE longdescs SET isprivate = ?
...@@ -1191,7 +1191,7 @@ if ($::comma eq "" ...@@ -1191,7 +1191,7 @@ if ($::comma eq ""
} }
# Process data for Time Tracking fields # Process data for Time Tracking fields
if (UserInGroup(Bugzilla->params->{'timetrackinggroup'})) { if (Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'})) {
foreach my $field ("estimated_time", "remaining_time") { foreach my $field ("estimated_time", "remaining_time") {
if (defined $cgi->param($field)) { if (defined $cgi->param($field)) {
my $er_time = trim($cgi->param($field)); my $er_time = trim($cgi->param($field));
...@@ -1535,7 +1535,7 @@ foreach my $id (@idlist) { ...@@ -1535,7 +1535,7 @@ foreach my $id (@idlist) {
$timestamp = $dbh->selectrow_array(q{SELECT NOW()}); $timestamp = $dbh->selectrow_array(q{SELECT NOW()});
my $work_time; my $work_time;
if (UserInGroup(Bugzilla->params->{'timetrackinggroup'})) { if (Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'})) {
$work_time = $cgi->param('work_time'); $work_time = $cgi->param('work_time');
if ($work_time) { if ($work_time) {
# AppendComment (called below) can in theory raise an error, # AppendComment (called below) can in theory raise an error,
......
...@@ -255,7 +255,7 @@ foreach my $val (editable_bug_fields()) { ...@@ -255,7 +255,7 @@ foreach my $val (editable_bug_fields()) {
push @chfields, $val; push @chfields, $val;
} }
if (UserInGroup(Bugzilla->params->{'timetrackinggroup'})) { if (Bugzilla->user->in_group(Bugzilla->params->{'timetrackinggroup'})) {
push @chfields, "work_time"; push @chfields, "work_time";
} else { } else {
@chfields = grep($_ ne "estimated_time", @chfields); @chfields = grep($_ ne "estimated_time", @chfields);
......
...@@ -76,7 +76,7 @@ if ($action eq "add") { ...@@ -76,7 +76,7 @@ if ($action eq "add") {
# Add the quip # Add the quip
my $approved = (Bugzilla->params->{'quip_list_entry_control'} eq "open") my $approved = (Bugzilla->params->{'quip_list_entry_control'} eq "open")
|| UserInGroup('admin') || 0; || Bugzilla->user->in_group('admin') || 0;
my $comment = $cgi->param("quip"); my $comment = $cgi->param("quip");
$comment || ThrowUserError("need_quip"); $comment || ThrowUserError("need_quip");
trick_taint($comment); # Used in a placeholder below trick_taint($comment); # Used in a placeholder below
...@@ -115,7 +115,7 @@ if ($action eq 'approve') { ...@@ -115,7 +115,7 @@ if ($action eq 'approve') {
} }
if ($action eq "delete") { if ($action eq "delete") {
UserInGroup("admin") Bugzilla->user->in_group("admin")
|| ThrowUserError("auth_failure", {group => "admin", || ThrowUserError("auth_failure", {group => "admin",
action => "delete", action => "delete",
object => "quips"}); object => "quips"});
......
...@@ -81,7 +81,7 @@ sub queue { ...@@ -81,7 +81,7 @@ sub queue {
my $attach_join_clause = "flags.attach_id = attachments.attach_id"; my $attach_join_clause = "flags.attach_id = attachments.attach_id";
if (Bugzilla->params->{"insidergroup"} if (Bugzilla->params->{"insidergroup"}
&& !UserInGroup(Bugzilla->params->{"insidergroup"})) && !Bugzilla->user->in_group(Bugzilla->params->{"insidergroup"}))
{ {
$attach_join_clause .= " AND attachments.isprivate < 1"; $attach_join_clause .= " AND attachments.isprivate < 1";
} }
......
...@@ -86,7 +86,7 @@ my $template = Bugzilla->template; ...@@ -86,7 +86,7 @@ my $template = Bugzilla->template;
# and restricting access to this installation's administrators (which # and restricting access to this installation's administrators (which
# prevents users with a legitimate interest in Bugzilla integrity # prevents users with a legitimate interest in Bugzilla integrity
# from accessing the script). # from accessing the script).
UserInGroup("editbugs") Bugzilla->user->in_group("editbugs")
|| ThrowUserError("auth_failure", {group => "editbugs", || ThrowUserError("auth_failure", {group => "editbugs",
action => "run", action => "run",
object => "sanity_check"}); object => "sanity_check"});
......
...@@ -119,7 +119,7 @@ if ($cgi->param("field")) { ...@@ -119,7 +119,7 @@ if ($cgi->param("field")) {
@fieldlist = $cgi->param("field"); @fieldlist = $cgi->param("field");
} }
unless (UserInGroup(Bugzilla->params->{"timetrackinggroup"})) { unless (Bugzilla->user->in_group(Bugzilla->params->{"timetrackinggroup"})) {
@fieldlist = grep($_ !~ /_time$/, @fieldlist); @fieldlist = grep($_ !~ /_time$/, @fieldlist);
} }
......
...@@ -28,7 +28,7 @@ use Bugzilla::Constants; # LOGIN_* ...@@ -28,7 +28,7 @@ use Bugzilla::Constants; # LOGIN_*
use Bugzilla::Bug; # EmitDependList use Bugzilla::Bug; # EmitDependList
use Bugzilla::Util; # trim use Bugzilla::Util; # trim
use Bugzilla::Error; use Bugzilla::Error;
use Bugzilla::User; # UserInGroup use Bugzilla::User; # Bugzilla->user->in_group
my $template = Bugzilla->template; my $template = Bugzilla->template;
my $vars = {}; my $vars = {};
...@@ -404,7 +404,7 @@ my $cgi = Bugzilla->cgi; ...@@ -404,7 +404,7 @@ my $cgi = Bugzilla->cgi;
Bugzilla->switch_to_shadow_db(); Bugzilla->switch_to_shadow_db();
UserInGroup(Bugzilla->params->{"timetrackinggroup"}) Bugzilla->user->in_group(Bugzilla->params->{"timetrackinggroup"})
|| ThrowUserError("auth_failure", {group => "time-tracking", || ThrowUserError("auth_failure", {group => "time-tracking",
action => "access", action => "access",
object => "timetracking_summaries"}); object => "timetracking_summaries"});
......
...@@ -51,10 +51,11 @@ ...@@ -51,10 +51,11 @@
<input type="hidden" name="action" value="new"> <input type="hidden" name="action" value="new">
</form> </form>
<p><b>Name</b> is what is used with the UserInGroup() function in any <p><b>Name</b> is what is used with the B<!-- blah -->ugzilla->user->in_group()
customized cgi files you write that use a given group. It can also be used function in any customized cgi files you write that use a given group.
by people submitting [% terms.bugs %] by email to limit [% terms.abug %] to It can also be used by people submitting [% terms.bugs %] by email to
a certain set of groups. It may not contain any spaces.</p> limit [% terms.abug %] to a certain set of groups. It may not contain
any spaces.</p>
<p><b>Description</b> is what will be shown in the [% terms.bug %] reports <p><b>Description</b> is what will be shown in the [% terms.bug %] reports
to members of the group where they can choose whether to members of the group where they can choose whether
......
...@@ -136,10 +136,10 @@ ...@@ -136,10 +136,10 @@
<p><a href="editgroups.cgi?action=add">Add Group</a></p> <p><a href="editgroups.cgi?action=add">Add Group</a></p>
<p> <p>
<b>Name</b> is what is used with the UserInGroup() function in any <b>Name</b> is what is used with the B<!-- blah -->ugzilla->user->in_group()
customized cgi files you write that use a given group. It can also be used function in any customized cgi files you write that use a given group.
by people submitting [% terms.bugs %] by email to limit [% terms.abug %] It can also be used by people submitting [% terms.bugs %] by email to
to a certain set of groups. limit [% terms.abug %] to a certain set of groups.
</p> </p>
<p> <p>
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
[% IF attachments.size %] [% IF attachments.size %]
[% FOREACH attachment = attachments %] [% FOREACH attachment = attachments %]
[% IF ((attachment.isprivate == 0) || (Param("insidergroup") [% IF ((attachment.isprivate == 0) || (Param("insidergroup")
&& UserInGroup(Param("insidergroup")))) %] && user.in_group(Param("insidergroup")))) %]
<input type="checkbox" id="[% attachment.id %]" <input type="checkbox" id="[% attachment.id %]"
name="obsolete" value="[% attachment.id %]"> name="obsolete" value="[% attachment.id %]">
<a href="attachment.cgi?id=[% attachment.id %]&amp;action=edit">[% attachment.id %]: [% attachment.description FILTER html %]</a><br> <a href="attachment.cgi?id=[% attachment.id %]&amp;action=edit">[% attachment.id %]: [% attachment.description FILTER html %]</a><br>
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
%] %]
</td> </td>
</tr> </tr>
[% IF (Param("insidergroup") && UserInGroup(Param("insidergroup"))) %] [% IF (Param("insidergroup") && user.in_group(Param("insidergroup"))) %]
<tr> <tr>
<th>Privacy:</th> <th>Privacy:</th>
<td> <td>
......
...@@ -247,7 +247,7 @@ ...@@ -247,7 +247,7 @@
<input type="checkbox" id="isobsolete" name="isobsolete" value="1" <input type="checkbox" id="isobsolete" name="isobsolete" value="1"
[% 'checked="checked"' IF attachment.isobsolete %]> [% 'checked="checked"' IF attachment.isobsolete %]>
<label for="isobsolete">obsolete</label><br> <label for="isobsolete">obsolete</label><br>
[% IF (Param("insidergroup") && UserInGroup(Param("insidergroup"))) %] [% IF (Param("insidergroup") && user.in_group(Param("insidergroup"))) %]
<input type="checkbox" name="isprivate" value="1" <input type="checkbox" name="isprivate" value="1"
[% " checked" IF attachment.isprivate %]> private<br><br> [% " checked" IF attachment.isprivate %]> private<br><br>
[% ELSE %]<br> [% ELSE %]<br>
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
[% END %] [% END %]
<th bgcolor="#cccccc" align="left">Actions</th> <th bgcolor="#cccccc" align="left">Actions</th>
</tr> </tr>
[% canseeprivate = !Param("insidergroup") || UserInGroup(Param("insidergroup")) %] [% canseeprivate = !Param("insidergroup") || user.in_group(Param("insidergroup")) %]
[% count = 0 %] [% count = 0 %]
[% FOREACH attachment = attachments %] [% FOREACH attachment = attachments %]
[% count = count + 1 %] [% count = count + 1 %]
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
[% DEFAULT start_at = 0 mode = "show" %] [% DEFAULT start_at = 0 mode = "show" %]
[% isinsider = Param("insidergroup") && UserInGroup(Param("insidergroup")) %] [% isinsider = Param("insidergroup") && user.in_group(Param("insidergroup")) %]
[% sort_order = user.settings.comment_sort_order.value %] [% sort_order = user.settings.comment_sort_order.value %]
[%# NOTE: (start_at > 0) means we came here from a midair collision, [%# NOTE: (start_at > 0) means we came here from a midair collision,
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
<label for="isprivate-[% count %]">Private</label> <label for="isprivate-[% count %]">Private</label>
</i> </i>
[% END %] [% END %]
[% IF UserInGroup(Param('timetrackinggroup')) && [% IF user.in_group(Param('timetrackinggroup')) &&
(comment.work_time > 0 || comment.work_time < 0) %] (comment.work_time > 0 || comment.work_time < 0) %]
<br> <br>
Additional hours worked: Additional hours worked:
......
...@@ -258,7 +258,7 @@ function handleWantsAttachment(wants_attachment) { ...@@ -258,7 +258,7 @@ function handleWantsAttachment(wants_attachment) {
<td>&nbsp;</td> <td>&nbsp;</td>
[%# Calculate the number of rows we can use for flags %] [%# Calculate the number of rows we can use for flags %]
[% num_rows = 6 + (Param("useqacontact") ? 1 : 0) + [% num_rows = 6 + (Param("useqacontact") ? 1 : 0) +
(UserInGroup(Param('timetrackinggroup')) ? 3 : 0) + (user.in_group(Param('timetrackinggroup')) ? 3 : 0) +
(Param("usebugaliases") ? 1 : 0) (Param("usebugaliases") ? 1 : 0)
%] %]
<td rowspan="[% num_rows FILTER html %]" valign="top"> <td rowspan="[% num_rows FILTER html %]" valign="top">
...@@ -323,7 +323,7 @@ function handleWantsAttachment(wants_attachment) { ...@@ -323,7 +323,7 @@ function handleWantsAttachment(wants_attachment) {
<td colspan="2"></td> <td colspan="2"></td>
</tr> </tr>
[% IF UserInGroup(Param('timetrackinggroup')) %] [% IF user.in_group(Param('timetrackinggroup')) %]
<tr> <tr>
<td align="right"><strong>Estimated Hours:</strong></td> <td align="right"><strong>Estimated Hours:</strong></td>
<td colspan="2"> <td colspan="2">
...@@ -400,7 +400,7 @@ function handleWantsAttachment(wants_attachment) { ...@@ -400,7 +400,7 @@ function handleWantsAttachment(wants_attachment) {
</td> </td>
</tr> </tr>
[% IF Param("insidergroup") && UserInGroup(Param("insidergroup")) %] [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %]
<tr> <tr>
<td></td> <td></td>
<td colspan="3"> <td colspan="3">
...@@ -450,7 +450,7 @@ function handleWantsAttachment(wants_attachment) { ...@@ -450,7 +450,7 @@ function handleWantsAttachment(wants_attachment) {
</td> </td>
</tr> </tr>
[% IF UserInGroup('editbugs') %] [% IF user.in_group('editbugs') %]
[% IF use_keywords %] [% IF use_keywords %]
<tr> <tr>
<td align="right" valign="top"> <td align="right" valign="top">
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
replytext = "(In reply to comment #" + id + ")\n" + replytext + "\n"; replytext = "(In reply to comment #" + id + ")\n" + replytext + "\n";
[% IF Param("insidergroup") && UserInGroup(Param("insidergroup")) %] [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %]
if (document.getElementById('isprivate-'+id).checked) { if (document.getElementById('isprivate-'+id).checked) {
document.getElementById('newcommentprivacy').checked = 'checked'; document.getElementById('newcommentprivacy').checked = 'checked';
} }
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
return text; return text;
} }
[% IF UserInGroup(Param('timetrackinggroup')) %] [% IF user.in_group(Param('timetrackinggroup')) %]
var fRemainingTime = [% bug.remaining_time %]; // holds the original value var fRemainingTime = [% bug.remaining_time %]; // holds the original value
function adjustRemainingTime() { function adjustRemainingTime() {
// subtracts time spent from remaining time // subtracts time spent from remaining time
...@@ -435,7 +435,7 @@ ...@@ -435,7 +435,7 @@
</tr> </tr>
</table> </table>
[% IF UserInGroup(Param('timetrackinggroup')) %] [% IF user.in_group(Param('timetrackinggroup')) %]
<br> <br>
<table cellspacing="0" cellpadding="4" border="1"> <table cellspacing="0" cellpadding="4" border="1">
<tr> <tr>
...@@ -561,7 +561,7 @@ ...@@ -561,7 +561,7 @@
<br> <br>
<label for="comment" accesskey="c"><b>Additional <u>C</u>omments</b></label>: <label for="comment" accesskey="c"><b>Additional <u>C</u>omments</b></label>:
[% IF Param("insidergroup") && UserInGroup(Param("insidergroup")) %] [% IF Param("insidergroup") && user.in_group(Param("insidergroup")) %]
<input type="checkbox" name="commentprivacy" value="1" <input type="checkbox" name="commentprivacy" value="1"
id="newcommentprivacy" id="newcommentprivacy"
onClick="updateCommentTagControl(this, form)"> onClick="updateCommentTagControl(this, form)">
......
...@@ -183,7 +183,7 @@ ...@@ -183,7 +183,7 @@
[% PROCESS dependencies name = "blocked" %] [% PROCESS dependencies name = "blocked" %]
[% END %] [% END %]
[% IF UserInGroup(Param("timetrackinggroup")) %] [% IF user.in_group(Param("timetrackinggroup")) %]
<tr> <tr>
<th>Time tracking:</th> <th>Time tracking:</th>
<td colspan="3"> <td colspan="3">
......
...@@ -67,11 +67,11 @@ ...@@ -67,11 +67,11 @@
[% END %] [% END %]
[% IF displayfields.long_desc %] [% IF displayfields.long_desc %]
[% FOREACH c = bug.longdescs %] [% FOREACH c = bug.longdescs %]
[% NEXT IF c.isprivate && !UserInGroup(Param("insidergroup")) %] [% NEXT IF c.isprivate && !user.in_group(Param("insidergroup")) %]
<long_desc isprivate="[% c.isprivate FILTER xml %]"> <long_desc isprivate="[% c.isprivate FILTER xml %]">
<who>[% c.email FILTER xml %]</who> <who>[% c.email FILTER xml %]</who>
<bug_when>[% c.time FILTER time FILTER xml %]</bug_when> <bug_when>[% c.time FILTER time FILTER xml %]</bug_when>
[% IF UserInGroup(Param('timetrackinggroup')) && (c.work_time - 0 != 0) %] [% IF user.in_group(Param('timetrackinggroup')) && (c.work_time - 0 != 0) %]
<work_time>[% PROCESS formattimeunit time_unit = c.work_time FILTER xml %]</work_time> <work_time>[% PROCESS formattimeunit time_unit = c.work_time FILTER xml %]</work_time>
[% END %] [% END %]
<thetext>[% c.body FILTER xml %]</thetext> <thetext>[% c.body FILTER xml %]</thetext>
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
[% IF displayfields.attachment %] [% IF displayfields.attachment %]
[% FOREACH a = bug.attachments %] [% FOREACH a = bug.attachments %]
[% NEXT IF a.isprivate && !UserInGroup(Param("insidergroup")) %] [% NEXT IF a.isprivate && !user.in_group(Param("insidergroup")) %]
<attachment <attachment
isobsolete="[% a.isobsolete FILTER xml %]" isobsolete="[% a.isobsolete FILTER xml %]"
ispatch="[% a.ispatch FILTER xml %]" ispatch="[% a.ispatch FILTER xml %]"
......
...@@ -907,8 +907,8 @@ ...@@ -907,8 +907,8 @@
'components.html' => 'Creating a component'} %] 'components.html' => 'Creating a component'} %]
Sorry, the product <em>[% product FILTER html %]</em> Sorry, the product <em>[% product FILTER html %]</em>
has to have at least one component in order for you to has to have at least one component in order for you to
enter [% terms.abug %] into it.<p> enter [% terms.abug %] into it.<br>
[% IF UserInGroup("editcomponents") %] [% IF user.in_group("editcomponents") %]
<a href="editcomponents.cgi?action=add&amp;product=[% product FILTER url_quote %]">Create <a href="editcomponents.cgi?action=add&amp;product=[% product FILTER url_quote %]">Create
a new component</a>. a new component</a>.
[% ELSE %] [% ELSE %]
...@@ -980,7 +980,7 @@ ...@@ -980,7 +980,7 @@
Sorry, the product <em>[% product FILTER html %]</em> Sorry, the product <em>[% product FILTER html %]</em>
has to have at least one version in order for you to has to have at least one version in order for you to
enter [% terms.abug %] into it.<p> enter [% terms.abug %] into it.<p>
[% IF UserInGroup("editcomponents") %] [% IF user.in_group("editcomponents") %]
<a href="editversions.cgi?action=add&amp;product=[% product FILTER url_quote %]">Create <a href="editversions.cgi?action=add&amp;product=[% product FILTER url_quote %]">Create
a new version</a>. a new version</a>.
[% ELSE %] [% ELSE %]
......
...@@ -131,7 +131,7 @@ ...@@ -131,7 +131,7 @@
[% END %] [% END %]
</tr> </tr>
[% IF UserInGroup(Param("timetrackinggroup")) %] [% IF user.in_group(Param("timetrackinggroup")) %]
<tr> <tr>
<th><label for="estimated_time">Estimated Hours:</label></th> <th><label for="estimated_time">Estimated Hours:</label></th>
<td> <td>
......
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
<input type="submit" value="XML" id="xml"> <input type="submit" value="XML" id="xml">
</form> </form>
[% IF UserInGroup(Param('timetrackinggroup')) %] [% IF user.in_group(Param('timetrackinggroup')) %]
<form method="post" action="summarize_time.cgi"> <form method="post" action="summarize_time.cgi">
<input type="hidden" name="id" value="[% buglist_joined FILTER html %]"> <input type="hidden" name="id" value="[% buglist_joined FILTER html %]">
<input type="submit" id="timesummary" value="Time Summary"> <input type="submit" id="timesummary" value="Time Summary">
......
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
[% END %] [% END %]
[% IF show_quips %] [% IF show_quips %]
[% IF !UserInGroup('admin') %] [% IF !user.in_group('admin') %]
<h2> <h2>
Existing quips: Existing quips:
</h2> </h2>
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
<p> <p>
Those who like their wisdom in large doses can Those who like their wisdom in large doses can
<a href="quips.cgi?action=show">view <a href="quips.cgi?action=show">view
[% IF UserInGroup('admin') %] [% IF user.in_group('admin') %]
and edit and edit
[% END %] [% END %]
the whole quip list</a>. the whole quip list</a>.
......
...@@ -188,7 +188,7 @@ function subcatSelected() { ...@@ -188,7 +188,7 @@ function subcatSelected() {
</td> </td>
<td align="center"> <td align="center">
[% IF user.id == series.creator OR UserInGroup("admin") %] [% IF user.id == series.creator OR user.in_group("admin") %]
<a href="chart.cgi?action=edit&series_id= <a href="chart.cgi?action=edit&series_id=
[% series.series_id %]">Edit</a> | [% series.series_id %]">Edit</a> |
[% END %] [% END %]
...@@ -260,7 +260,7 @@ function subcatSelected() { ...@@ -260,7 +260,7 @@ function subcatSelected() {
[% END %] [% END %]
</form> </form>
[% IF UserInGroup('editbugs') %] [% IF user.in_group('editbugs') %]
<h3><a href="query.cgi?format=create-series">Create New Data Set</a></h3> <h3><a href="query.cgi?format=create-series">Create New Data Set</a></h3>
[% END %] [% END %]
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
plot the status and/or resolution of [% terms.bugs %] against plot the status and/or resolution of [% terms.bugs %] against
time, for each product in your database. time, for each product in your database.
</li> </li>
[% IF UserInGroup(Param("chartgroup")) %] [% IF user.in_group(Param("chartgroup")) %]
<li> <li>
<strong><a href="chart.cgi">New Charts</a></strong> - <strong><a href="chart.cgi">New Charts</a></strong> -
plot any arbitrary search against time. Far more powerful. plot any arbitrary search against time. Far more powerful.
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<span style="font-weight: bold;">&nbsp;day(s)</span><br> <span style="font-weight: bold;">&nbsp;day(s)</span><br>
[%# Change 'admin' here and in Series.pm, or remove the check [%# Change 'admin' here and in Series.pm, or remove the check
completely, if you want to change who can make series public. %] completely, if you want to change who can make series public. %]
[% IF UserInGroup('admin') %] [% IF user.in_group('admin') %]
<input type="checkbox" name="public" <input type="checkbox" name="public"
[% "checked='checked'" IF default.public.0 %]> [% "checked='checked'" IF default.public.0 %]>
<span style="font-weight: bold;">Visible to all<br> <span style="font-weight: bold;">Visible to all<br>
......
...@@ -316,7 +316,7 @@ function doOnSelectProduct(selectmode) { ...@@ -316,7 +316,7 @@ function doOnSelectProduct(selectmode) {
[% END %] [% END %]
[%# Deadline %] [%# Deadline %]
[% IF UserInGroup(Param("timetrackinggroup")) %] [% IF user.in_group(Param("timetrackinggroup")) %]
<tr> <tr>
<th align="right"> <th align="right">
<label for="deadlinefrom" accesskey="l">Dead<u>l</u>ine</label>: <label for="deadlinefrom" accesskey="l">Dead<u>l</u>ine</label>:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment