fixed #12129: AdminBar calls canAdd as an object method
This commit is contained in:
parent
0df9fb747a
commit
c1a29182ca
4 changed files with 31 additions and 3 deletions
|
|
@ -226,6 +226,10 @@ The "turn admin on" group which is group id 12.
|
|||
|
||||
sub canAdd {
|
||||
my $className = shift;
|
||||
|
||||
# just in case we get called as object method
|
||||
$className = $className->get('className') if blessed $className;
|
||||
|
||||
my $session = shift;
|
||||
my $userId = shift || $session->user->userId;
|
||||
my $user = WebGUI::User->new($session, $userId);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue