[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/members member-password.pl [rel_2_2]
From: |
Ryan Higgins |
Subject: |
[Koha-cvs] koha/members member-password.pl [rel_2_2] |
Date: |
Fri, 04 May 2007 20:26:04 +0000 |
CVSROOT: /sources/koha
Module name: koha
Branch: rel_2_2
Changes by: Ryan Higgins <rych> 07/05/04 20:26:04
Modified files:
members : member-password.pl
Log message:
A user with edit-borrower privileges must now also have permissions
privileges
in order to change password of another privileged user, where
'privileged'
is defined as having more than 'borrow' or 'reserveforself' permissions.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/members/member-password.pl?cvsroot=koha&only_with_tag=rel_2_2&r1=1.3.2.4&r2=1.3.2.5
Patches:
Index: member-password.pl
===================================================================
RCS file: /sources/koha/koha/members/member-password.pl,v
retrieving revision 1.3.2.4
retrieving revision 1.3.2.5
diff -u -b -r1.3.2.4 -r1.3.2.5
--- member-password.pl 28 Jan 2007 05:43:42 -0000 1.3.2.4
+++ member-password.pl 4 May 2007 20:26:04 -0000 1.3.2.5
@@ -30,25 +30,26 @@
debug => 1,
});
-my $flagsrequired;
-$flagsrequired->{borrowers}=1;
-my ($loggedinuser, $cookie, $sessionID) = checkauth($input, 0, $flagsrequired);
my $member=$input->param('member');
-my %env;
-$env{'nottodayissues'}=1;
-my %member2;
-$member2{'borrowernumber'}=$member;
-my $issues=currentissues(\%env,\%member2);
-my $i=0;
-foreach (sort keys %$issues) {
- $i++;
+
+my ($bor,$flags)=getpatroninformation(undef, $member,'');
+##if this is a privileged user, we need 'permissions' flag in order to change
their passwd.
+my $flagsrequired;
+if ($member != $loggedinuser) {
+ for my $perm ( keys %{$bor->{authflags}}) {
+ $flagsrequired->{'permissions'}=1 unless ( ($perm eq 'borrow')
|| ($perm eq 'reserveforself') );
+ }
+ if ($flagsrequired) {
+warn "checkauth";
+ checkauth($input, 0, $flagsrequired,'intranet');
+ }
}
+
my $MinPasswordLength = (C4::Context->preference("MinPasswordLength") ?
C4::Context->preference("MinPasswordLength") :5
);
-my ($bor,$flags)=getpatroninformation(\%env, $member,'');
my $newpassword = $input->param('newpassword');
if (length($newpassword) < $MinPasswordLength && $newpassword ne ''){
$template->param('ShortPass' => '1');
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/members member-password.pl [rel_2_2],
Ryan Higgins <=