This patch tweaks the logic to check the permissions is defined before
passing to haspermission.
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
my $permissions = $authorization->{'permissions'};
# Check if the user is authorized
- if ( haspermission($user->userid, $permissions)
+ if ( ( defined($permissions) and haspermission($user->userid, $permissions) )
or allow_owner($c, $authorization, $user)
or allow_guarantor($c, $authorization, $user) ) {