--- loncom/interface/lonuserutils.pm 2022/02/20 19:48:31 1.184.4.10.2.1 +++ loncom/interface/lonuserutils.pm 2023/01/22 17:21:54 1.184.4.10.2.2 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.184.4.10.2.1 2022/02/20 19:48:31 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.184.4.10.2.2 2023/01/22 17:21:54 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -6114,8 +6114,9 @@ sub get_permission { } } my $allowed = 0; - foreach my $perm (values(%permission)) { - if ($perm) { $allowed=1; last; } + foreach my $key (keys(%permission)) { + next if (($key eq 'owner') || ($key eq 'co-owner')); + if ($permission{$key}) { $allowed=1; last; } } return (\%permission,$allowed); }