--- loncom/interface/lonuserutils.pm 2022/02/14 01:15:24 1.210 +++ loncom/interface/lonuserutils.pm 2022/11/17 19:07:21 1.211 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Utility functions for managing LON-CAPA user accounts # -# $Id: lonuserutils.pm,v 1.210 2022/02/14 01:15:24 raeburn Exp $ +# $Id: lonuserutils.pm,v 1.211 2022/11/17 19:07:21 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -6194,8 +6194,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); }