[system] / trunk / webwork-modperl / lib / WeBWorK / Authz.pm Repository:
ViewVC logotype

Diff of /trunk/webwork-modperl/lib/WeBWorK/Authz.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2505 Revision 2506
1################################################################################ 1################################################################################
2# WeBWorK Online Homework Delivery System 2# WeBWorK Online Homework Delivery System
3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/ 3# Copyright © 2000-2003 The WeBWorK Project, http://openwebwork.sf.net/
4# $CVSHeader: webwork2/lib/WeBWorK/Authz.pm,v 1.14 2004/03/15 20:17:35 sh002i Exp $ 4# $CVSHeader: webwork2/lib/WeBWorK/Authz.pm,v 1.15 2004/07/12 22:15:56 sh002i Exp $
5# 5#
6# This program is free software; you can redistribute it and/or modify it under 6# This program is free software; you can redistribute it and/or modify it under
7# the terms of either: (a) the GNU General Public License as published by the 7# the terms of either: (a) the GNU General Public License as published by the
8# Free Software Foundation; either version 2, or (at your option) any later 8# Free Software Foundation; either version 2, or (at your option) any later
9# version, or (b) the "Artistic License" which comes with this package. 9# version, or (b) the "Artistic License" which comes with this package.
45 45
46 my $Permission = $db->getPermissionLevel($user); # checked 46 my $Permission = $db->getPermissionLevel($user); # checked
47 return 0 unless defined $Permission; 47 return 0 unless defined $Permission;
48 my $permissionLevel = $Permission->permission(); 48 my $permissionLevel = $Permission->permission();
49 49
50 my $permissionLevels = $ce->{permissionLevels};
50 if (exists $permissionLevels->{$activity}) { 51 if (exists $permissionLevels->{$activity}) {
51 if (defined $permissionLevels->{$activity}) { 52 if (defined $permissionLevels->{$activity}) {
52 return $permissionLevel >= $permissionLevels->{$activity}; 53 return $permissionLevel >= $permissionLevels->{$activity};
53 } else { 54 } else {
54 return 0; 55 return 0;

Legend:
Removed from v.2505  
changed lines
  Added in v.2506

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9