Changeset 3465 for trunk/www/filemanager/upload/select.jsp
- Timestamp:
- Jun 7, 2007, 1:50:45 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/filemanager/upload/select.jsp
r3463 r3465 36 36 import="net.sf.basedb.core.File" 37 37 import="net.sf.basedb.core.FileType" 38 import="net.sf.basedb.core.User" 39 import="net.sf.basedb.core.Group" 40 import="net.sf.basedb.core.Quota" 41 import="net.sf.basedb.core.QuotaType" 42 import="net.sf.basedb.core.Location" 38 43 import="net.sf.basedb.core.PluginDefinition" 39 44 import="net.sf.basedb.core.Include" … … 102 107 } 103 108 109 if (file == null || file.getLocation() != Location.PRIMARY) 110 { 111 // Check quota 112 User user = User.getById(dc, sc.getLoggedInUserId()); 113 QuotaType totalQuotaType = QuotaType.getById(dc, SystemItems.getId(QuotaType.TOTAL)); 114 QuotaType fileQuotaType = QuotaType.getById(dc, SystemItems.getId(QuotaType.FILE)); 115 116 if (user.hasExceededQuota(totalQuotaType, Location.PRIMARY) 117 || user.hasExceededQuota(fileQuotaType, Location.PRIMARY)) 118 { 119 throw new PermissionDeniedException("Quota has been exceeded"); 120 } 121 } 122 123 104 124 // Query to retrieve file types 105 125 final ItemQuery<FileType> fileTypeQuery = FileType.getQuery();
Note: See TracChangeset
for help on using the changeset viewer.