diff options
author | Yorhel <git@yorhel.nl> | 2012-01-07 09:40:31 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2012-01-07 09:40:31 +0100 |
commit | 525fa050003ee18da1f58e0e4138ec08c49418a8 (patch) | |
tree | 3928f03f9c3584131fcf26007a095f7bd5dd3b94 /lib | |
parent | 45e26de363ff7e60e7a68e667e1d2012dfe06abd (diff) |
Handler::Users: Use |= instead of += to generate permissions on useredit
Fixes a bug when both 'charedit' and 'edit' are selected, in which case
neither flag will be set.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNDB/Handler/Users.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/VNDB/Handler/Users.pm b/lib/VNDB/Handler/Users.pm index 58410f8b..cc5ce28c 100644 --- a/lib/VNDB/Handler/Users.pm +++ b/lib/VNDB/Handler/Users.pm @@ -363,7 +363,7 @@ sub edit { $o{username} = $frm->{usrname} if $frm->{usrname}; if($self->authCan('usermod')) { $o{perm} = 0; - $o{perm} += $self->{permissions}{$_} for(@{ delete $frm->{perms} }); + $o{perm} |= $self->{permissions}{$_} for(@{ delete $frm->{perms} }); } $o{mail} = $frm->{mail}; ($o{passwd}, $o{salt}) = $self->authPreparePass($frm->{usrpass}) if $frm->{usrpass}; |