Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
19e709e5
Commit
19e709e5
authored
Mar 09, 2012
by
Francisco Donalisio
Committed by
Dave Lawrence
Mar 09, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 730794 - Need new hook edituser page
r=dkl, a=LpSolit
parent
823edaec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
Hook.pm
Bugzilla/Hook.pm
+24
-0
editusers.cgi
editusers.cgi
+3
-0
Extension.pm
extensions/Example/Extension.pm
+14
-0
No files found.
Bugzilla/Hook.pm
View file @
19e709e5
...
...
@@ -1354,6 +1354,30 @@ name), you can get it from here.
=back
=head2 admin_editusers_action
This hook allows you to add additional actions to the admin Users page.
Params:
=over
=item C<vars>
You can add as many new key/value pairs as you want to this hashref.
It will be passed to the template.
=item C<action>
A text which indicates the different behaviors that edit_users.cgi will have.
With this hook you can change the behavior of an action or add new actions.
=item C<user>
This is a Bugzilla::User object of the user.
=back
=head2 user_preferences
This hook allows you to add additional panels to the User Preferences page,
...
...
editusers.cgi
View file @
19e709e5
...
...
@@ -50,6 +50,9 @@ my $token = $cgi->param('token');
$vars
->
{
'editusers'
}
=
$editusers
;
mirrorListSelectionValues
();
Bugzilla::Hook::
process
(
'admin_editusers_action'
,
{
vars
=>
$vars
,
user
=>
$user
,
action
=>
$action
});
###########################################################################
if
(
$action
eq
'search'
)
{
# Allow to restrict the search to any group the user is allowed to bless.
...
...
extensions/Example/Extension.pm
View file @
19e709e5
...
...
@@ -807,6 +807,20 @@ sub bug_check_can_change_field {
}
}
sub
admin_editusers_action
{
my
(
$self
,
$args
)
=
@_
;
my
(
$vars
,
$action
,
$user
)
=
@$args
{
qw(vars action user)
};
my
$template
=
Bugzilla
->
template
;
if
(
$action
eq
'my_action'
)
{
# Allow to restrict the search to any group the user is allowed to bless.
$vars
->
{
'restrictablegroups'
}
=
$user
->
bless_groups
();
$template
->
process
(
'admin/users/search.html.tmpl'
,
$vars
)
||
ThrowTemplateError
(
$template
->
error
());
exit
;
}
}
sub
user_preferences
{
my
(
$self
,
$args
)
=
@_
;
my
$tab
=
$args
->
{
current_tab
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment