From fd5be728fcf18479146aab4d52254c3475124154 Mon Sep 17 00:00:00 2001 From: "mkanat%bugzilla.org" <> Date: Tue, 6 Mar 2007 10:54:07 +0000 Subject: Bug 354627: Improve the UI for adding/removing inheritance in editgroups.cgi Patch By Max Kanat-Alexander + # Joel Peshkin + # Jacob Steenhagen + # Vlad Dascalu + # Max Kanat-Alexander + #%] + +[%# INTERFACE: + # group: The Bugzilla::Group being changed. + # regexp: the regexp according to which the update is performed. + #%] + +[% IF regexp %] + [% title = "Confirm: Remove Explicit Members in the Regular Expression?" %] +[% ELSE %] + [% title = "Confirm: Remove All Explicit Members?" %] +[% END %] + +[% PROCESS global/header.html.tmpl %] + +[% IF regexp %] +

This option will remove all users from '[% group.name FILTER html %]' + whose login names match the regular expression: + '[% regexp FILTER html %]'

+[% ELSE %] +

This option will remove all explicitly defined users + from '[% group.name FILTER html %].'

+[% END %] + +

Generally, you will only need to do this when upgrading groups + created with [% terms.Bugzilla %] versions 2.16 and prior. Use + this option with extreme care and consult the documentation + for further information. +

+ +
+ + + + + + +

Or return to the Edit Groups page.

+
+ +

Back to the group list.

+ +[% PROCESS global/footer.html.tmpl %] diff --git a/template/en/default/admin/groups/edit.html.tmpl b/template/en/default/admin/groups/edit.html.tmpl index 6f333f5c3..89dd66ce6 100644 --- a/template/en/default/admin/groups/edit.html.tmpl +++ b/template/en/default/admin/groups/edit.html.tmpl @@ -20,51 +20,45 @@ # Joel Peshkin # Jacob Steenhagen # Vlad Dascalu + # Max Kanat-Alexander #%] [%# INTERFACE: - # group_id: number. The group ID. - # name: string. The name of the group. [grantor] - # description: string. The description of the group. - # regexp: string. The regular expression for the users of the group. - # isactive: boolean int. Shows if the group is still active. - # isbuggroup: boolean int. Is 1 if this is a bug group. - # groups: array with group objects having the properties: - # - grpid: number. The ID of the group. - # - grpname: string. The name of the group. [member] - # - grpdesc: string. The description of the group. - # - grpmember: boolean int. Is 1 if members of the group are to inherit - # membership in the group being edited. - # - blessmember: boolean int. Is 1 if members of the group are to be able - # to bless users into the group being edited. - # - membercansee: boolean int. Is 1 if the members of the group are to - # be aware of the group being edited and its members. + # group - A Bugzilla::Group representing the group being edited. + # *_current - Arrays of Bugzilla::Group objects that show the current + # values for this group, as far as grants. + # *_available - Arrays of Bugzilla::Group objects that show the current + # available values for each grant. #%] [% title = BLOCK %]Change Group: [% name FILTER html %][% END %] [% PROCESS global/header.html.tmpl - title = title - style = "tr.odd_row { - background: #e9e9e9; - } - .permissions th { - background: #000000; - color: #ffffff; - } - " + style = " + .grant_table { border-collapse: collapse; } + .grant_table td, .grant_table th { + padding-left: .5em; + } + .grant_table td.one, .grant_table th.one { + border-right: 1px solid black; + padding-right: .5em; + } + " %]
+ + + @@ -72,11 +66,11 @@ @@ -84,143 +78,157 @@ - [% IF isbuggroup %] + [% IF group.is_bug_group %] [% END %]
Group: - [% IF isbuggroup %] - - + [% IF group.is_bug_group %] + [% ELSE %] - [% name FILTER html %] + [% group.name FILTER html %] [% END %]
Description: - [% IF isbuggroup %] - - + [% IF group.is_bug_group %] + [% ELSE %] - [% description FILTER html %] + [% group.description FILTER html %] [% END %]
User Regexp: - - +
Use For [% terms.Bugs %]: - - +
-

Users become members of this group in one of three ways:

-
    -
  • by being explicity included when the user is edited. -
  • by matching the user regexp above. -
  • by being a member of one of the groups included in this group - by checking the boxes below. -
- - [% usevisibility = Param('usevisibilitygroups') %] - -

Group Permissions

- - - [% IF usevisibility %] - - [% END %] - - - - +

Group Permissions

+ +
- Visible - - Grant - - Inherit - - Group - - Description -
+ + + + + + + + - [% row = 0 %] - [% FOREACH group = groups %] - [% row = row + 1 %] - - [% IF usevisibility %] - - [% END %] - [% IF group_id != group.grpid %] - - - - [% ELSE %] - - - - [% END %] - - - [% END %]
Groups That Are a Member of This Group
+ ("Users in X are automatically in + [%+ group.name FILTER html %]")
Groups That This Group Is a Member Of
+ ("If you are in [% group.name FILTER html %], you are + automatically also in...")
+ [% PROCESS select_pair name = "members" size = 10 + items_available = members_available + items_current = members_current %] + [% PROCESS select_pair name = "member_of" size = 10 + items_available = member_of_available + items_current = member_of_current %]
- - - - - - - - - - - [% group.grpnam FILTER html %] - - - - - - - - [% group.grpnam FILTER html %] - - [% group.grpdesc FILTER html_light %]
- -
-
- [% IF usevisibility %] -
Visibility:
-
- Members of the selected groups can be aware of the - "[% name FILTER html %]" group -
- [% END %] -
Grant:
-
- Members of the selected groups can grant membership to the - "[% name FILTER html %]" group -
-
Inherit:
-
- Members of the selected groups are automatically members of the - "[% name FILTER html %]" group -
-
- +
- + + + + + -
-

Conversion of groups created with [% terms.Bugzilla %] - versions 2.16 and prior:

- -
    -
  • Remove all explicit memberships from this group: - -
  • - -
  • Remove all explicit memberships that are included in the above - regular expression: - -
  • -
+
+ Groups That Can Grant Membership in This Group
+ ("Users in X can add other users to + [%+ group.name FILTER html %]") + +
Groups That This Group Can Grant Membership In
+ ("Users in [% group.name FILTER html %] can add users to...") +
+ [% PROCESS select_pair name = "bless_from" size = 10 + items_available = bless_from_available + items_current = bless_from_current %] + [% PROCESS select_pair name = "bless_to" size = 10 + items_available = bless_to_available + items_current = bless_to_current %]
+ - - + [% IF Param('usevisibilitygroups') %] +
+ + + + + + + + +
+ Groups That Can See This Group
+ ("Users in X can see users in + [%+ group.name FILTER html %]") +
Groups That This Group Can See
+ ("Users in [% group.name FILTER html %] can see users in...") +
+ [% PROCESS select_pair name = "visible_from" size = 10 + items_available = visible_from_available + items_current = visible_from_current %] + [% PROCESS select_pair name = "visible_to_me" size = 10 + items_available = visible_to_me_available + items_current = visible_to_me_current %] +
+ [% END %] + + + +

Mass Remove

+ +

You can use this form to do mass-removal of users from groups. + This is often very useful if you upgraded from [% terms.Bugzilla %] + 2.16.

+
+
+
+ Remove all explict memberships from users whose login names + match the following regular expression: + + + +

If you leave the field blank, all explicit memberships in + this group will be removed.

+ + + +
+
+
+

Back to the group list.

[% PROCESS global/footer.html.tmpl %] + +[% BLOCK select_pair %] + + + + + + + + + +
+ + + +
+[% END %] diff --git a/template/en/default/admin/groups/remove.html.tmpl b/template/en/default/admin/groups/remove.html.tmpl index 8c41333e4..fc7613359 100644 --- a/template/en/default/admin/groups/remove.html.tmpl +++ b/template/en/default/admin/groups/remove.html.tmpl @@ -20,36 +20,21 @@ # Joel Peshkin # Jacob Steenhagen # Vlad Dascalu + # Max Kanat-Alexander #%] [%# INTERFACE: - # remove_all: boolean int. Is 1 if the action was remove_all, - # and 0 if the action was remove_all_regexp. - # name: string. The place where removal is performed. - # regexp: string. The regexp according to which the removal is performed. - # users: array with group objects having the properties: - # - login: string. The login which is removed. + # group: The Bugzilla::Group being modified. + # regexp: string. The regexp according to which the removal was performed. + # users: Array of Bugzilla::User objects who were removed from this group. #%] -[% IF remove_all %] - [% title = BLOCK %] - Removing All Explicit Group Memberships from '[% name FILTER html %]' - [% END %] -[% ELSE %] - [% title = BLOCK %] - Removing All Explicit Group Memberships Matching Group RegExp from '[% name FILTER html %]' - [% END %] -[% END %] - -[% PROCESS global/header.html.tmpl %] +[% PROCESS global/header.html.tmpl + title = "Removing Explicit Group Membership" %] -[% IF remove_all %] -

Removing explicit membership

-[% ELSE %] -

Removing explicit memberships of users matching - '[% regexp FILTER html %]'...

-[% END %] +

Removing explicit memberships[% IF regexp %] of users matching + '[% regexp FILTER html %]'[% END %]...

[% FOREACH user = users %] [% user.login FILTER html %] removed
diff --git a/template/en/default/global/messages.html.tmpl b/template/en/default/global/messages.html.tmpl index ef03f7614..bebed5579 100644 --- a/template/en/default/global/messages.html.tmpl +++ b/template/en/default/global/messages.html.tmpl @@ -209,6 +209,69 @@ An error occured while validating flags: [%+ flag_creation_error FILTER none %] + [% ELSIF message_tag == "group_updated" %] + [% IF changes.keys.size %] + The following changes have been made to the '[% group.name FILTER html %] + group: +
    + [% FOREACH field = changes.keys.sort %] + [% SWITCH field %] + [% CASE 'name' %] +
  • The name was changed to '[% changes.name.1 FILTER html %]'
  • + [% CASE 'description' %] +
  • The description was updated.
  • + [% CASE 'userregexp' %] +
  • The regular expression was updated.
  • + [% CASE 'isactive' %] + [% IF changes.isactive.1 %] +
  • The group will now be used for [% terms.bugs %].
  • + [% ELSE %] +
  • The group will no longer be used for [% terms.bugs %].
  • + [% END %] + [% CASE 'members_add' %] +
  • The following groups are now members of this group: + [%+ changes.members_add.join(', ') FILTER html %]
  • + [% CASE 'members_remove' %] +
  • The following groups are no longer members of this group: + [%+ changes.members_remove.join(', ') FILTER html %]
  • + [% CASE 'member_of_add' %] +
  • This group is now a member of the following groups: + [%+ changes.member_of_add.join(', ') FILTER html %]
  • + [% CASE 'member_of_remove' %] +
  • This group is no longer a member of the following groups: + [%+ changes.member_of_remove.join(', ') FILTER html %]
  • + [% CASE 'bless_from_add' %] +
  • The following groups may now add users to this group: + [%+ changes.bless_from_add.join(', ') FILTER html %]
  • + [% CASE 'bless_from_remove' %] +
  • The following groups may no longer add users to this group: + [%+ changes.bless_from_remove.join(', ') FILTER html %]
  • + [% CASE 'bless_to_add' %] +
  • This group may now add users to the following groups: + [%+ changes.bless_to_add.join(', ') FILTER html %]
  • + [% CASE 'bless_to_remove' %] +
  • This group may no longer add users to the following groups: + [%+ changes.bless_to_remove.join(', ') FILTER html %]
  • + [% CASE 'visible_from_add' %] +
  • The following groups can now see users in this group: + [%+ changes.visible_from_add.join(', ') FILTER html %]
  • + [% CASE 'visible_from_remove' %] +
  • The following groups may no longer see users in this group: + [%+ changes.visible_from_remove.join(', ') FILTER html %]
  • + [% CASE 'visible_to_me_add' %] +
  • This group may now see users in the following groups: + [%+ changes.visible_to_me_add.join(', ') FILTER html %]
  • + [% CASE 'visible_to_me_remove' %] +
  • This group may no longer see users in the following groups: + [%+ changes.visible_to_me_remove.join(', ') FILTER html %]
  • + [% END %] + [% END %] +
+ [% ELSE %] + You didn't request any change for the '[% group.name FILTER html %]' + group. + [% END %] + [% ELSIF message_tag == "logged_out" %] [% title = "Logged Out" %] [% url = "index.cgi?GoAheadAndLogIn=1" %] -- cgit v1.2.3-24-g4f1b