From 50dbcc4e7a38642856cbeeef88d2b3a4a884b5e1 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Fri, 8 Aug 2008 06:26:33 +0000 Subject: Bug 442031: Make Bugzilla::User::groups return an arrayref of Bugzilla::Group objects (instead of a hashref of group ids and names). --- template/en/default/admin/admin.html.tmpl | 20 ++++++++++---------- .../admin/fieldvalues/confirm-delete.html.tmpl | 2 +- .../en/default/admin/users/confirm-delete.html.tmpl | 4 ++-- template/en/default/admin/users/userdata.html.tmpl | 2 +- 4 files changed, 14 insertions(+), 14 deletions(-) (limited to 'template/en/default/admin') diff --git a/template/en/default/admin/admin.html.tmpl b/template/en/default/admin/admin.html.tmpl index c681767b5..15f126ba5 100644 --- a/template/en/default/admin/admin.html.tmpl +++ b/template/en/default/admin/admin.html.tmpl @@ -36,7 +36,7 @@
- [% class = user.groups.tweakparams ? "" : "forbidden" %] + [% class = user.in_group('tweakparams') ? "" : "forbidden" %]
Parameters
Set core parameters of the installation. That's the place where you specify the URL to access this installation, determine how @@ -49,25 +49,25 @@ which will be used by default for all users. Users will be able to edit their own preferences from the Preferences.
- [% class = user.groups.editcomponents ? "" : "forbidden" %] + [% class = user.in_group('editcomponents') ? "" : "forbidden" %]
Sanity Check
Run sanity checks to locate problems in your database. This may take several tens of minutes depending on the size of your installation. You can also automate this check by running sanitycheck.pl from a cron job. A notification will be sent per email to the specified user if errors are detected.
- [% class = (user.groups.editusers || user.can_bless) ? "" : "forbidden" %] + [% class = (user.in_group('editusers') || user.can_bless) ? "" : "forbidden" %]
Users
Create new user accounts or edit existing ones. You can also add and remove users from groups (also known as "user privileges").
- [% class = (Param('useclassification') && user.groups.editclassifications) ? "" : "forbidden" %] + [% class = (Param('useclassification') && user.in_group('editclassifications')) ? "" : "forbidden" %]
Classifications
If your installation has to manage many products at once, it's a good idea to group these products into distinct categories. This lets users find information more easily when doing searches or when filing new [% terms.bugs %].
- [% class = (user.groups.editcomponents + [% class = (user.in_group('editcomponents') || user.get_products_by_permission("editcomponents").size) ? "" : "forbidden" %]
Products
Edit all aspects of products, including group restrictions @@ -76,7 +76,7 @@ components, versions and milestones directly.
- [% class = user.groups.editcomponents ? "" : "forbidden" %] + [% class = user.in_group('editcomponents') ? "" : "forbidden" %]
Flags
A flag is a custom 4-states attribute of [% terms.bugs %] and/or attachments. These states are: granted, denied, requested and undefined. @@ -87,7 +87,7 @@
- [% class = user.groups.admin ? "" : "forbidden" %] + [% class = user.in_group('admin') ? "" : "forbidden" %]
Custom Fields
[% terms.Bugzilla %] lets you define fields which are not implemented by default, based on your local and specific requirements. @@ -107,18 +107,18 @@ statuses available on [% terms.bug %] creation and allowed [% terms.bug %] status transitions when editing existing [% terms.bugs %].
- [% class = user.groups.creategroups ? "" : "forbidden" %] + [% class = user.in_group('creategroups') ? "" : "forbidden" %]
Groups
Define groups which will be used in the installation. They can either be used to define new user privileges or to restrict the access to some [% terms.bugs %].
- [% class = user.groups.editkeywords ? "" : "forbidden" %] + [% class = user.in_group('editkeywords') ? "" : "forbidden" %]
Keywords
Set keywords to be used with [% terms.bugs %]. Keywords are an easy way to "tag" [% terms.bugs %] to let you find them more easily later.
- [% class = user.groups.bz_canusewhines ? "" : "forbidden" %] + [% class = user.in_group('bz_canusewhines') ? "" : "forbidden" %]
Whining
Set queries which will be run at some specified date and time, and get the result of these queries directly per email. This is a diff --git a/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl b/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl index 3320ae48f..d18e03a53 100644 --- a/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl +++ b/template/en/default/admin/fieldvalues/confirm-delete.html.tmpl @@ -71,7 +71,7 @@ [% IF param_name.defined && Param(param_name) == value %]
  • '[% value FILTER html %]' is the default value for the '[% field.description FILTER html %]' field. - [% IF user.groups.tweakparams %] + [% IF user.in_group('tweakparams') %] You first have to change the default value for this field before you can delete this value. diff --git a/template/en/default/admin/users/confirm-delete.html.tmpl b/template/en/default/admin/users/confirm-delete.html.tmpl index 218775dca..77d6772a6 100644 --- a/template/en/default/admin/users/confirm-delete.html.tmpl +++ b/template/en/default/admin/users/confirm-delete.html.tmpl @@ -69,8 +69,8 @@ [% IF otheruser.groups.size %]
      - [% FOREACH group = otheruser.groups.keys %] -
    • [% group FILTER html %]
    • + [% FOREACH group = otheruser.groups %] +
    • [% group.name FILTER html %]
    • [% END %]
    [% ELSE %] diff --git a/template/en/default/admin/users/userdata.html.tmpl b/template/en/default/admin/users/userdata.html.tmpl index feee4c5d6..f23aa1b85 100644 --- a/template/en/default/admin/users/userdata.html.tmpl +++ b/template/en/default/admin/users/userdata.html.tmpl @@ -27,7 +27,7 @@ [% IF editform %] - [% IF !otheruser.groups.bz_sudo_protect %] + [% IF !otheruser.in_group('bz_sudo_protect') %]
    Impersonate this user -- cgit v1.2.1