Univention Bugzilla – Attachment 8002 Details for
Bug 42368
don't require *-wildcards in the quota module search
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
42368.patch (text/plain), 2.04 KB, created by
Florian Best
on 2016-09-13 12:19:35 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2016-09-13 12:19:35 CEST
Size:
2.04 KB
patch
obsolete
>diff --git a/base/univention-quota/umc/js/quota/PartitionPage.js b/base/univention-quota/umc/js/quota/PartitionPage.js >index 47e382c..1e90a34 100644 >--- a/base/univention-quota/umc/js/quota/PartitionPage.js >+++ b/base/univention-quota/umc/js/quota/PartitionPage.js >@@ -90,7 +90,7 @@ define([ > var widgets = [{ > type: TextBox, > name: 'filter', >- value: '*' >+ value: '' > }]; > > this._searchForm = new SearchForm({ >diff --git a/base/univention-quota/umc/python/quota/user.py b/base/univention-quota/umc/python/quota/user.py >index 151f1f1..b8c0908 100644 >--- a/base/univention-quota/umc/python/quota/user.py >+++ b/base/univention-quota/umc/python/quota/user.py >@@ -33,14 +33,13 @@ > > import notifier > import notifier.threads >-from fnmatch import fnmatch > > import univention.management.console as umc > from univention.lib import fstab > from univention.management.console.log import MODULE > from univention.management.console.protocol.definitions import MODULE_ERR, SUCCESS > from univention.management.console.modules.decorators import sanitize >-from univention.management.console.modules.sanitizers import StringSanitizer, IntegerSanitizer >+from univention.management.console.modules.sanitizers import StringSanitizer, IntegerSanitizer, PatternSanitizer > > import mtab > import tools >@@ -50,7 +49,8 @@ > class Commands(object): > > @sanitize( >- partitionDevice=StringSanitizer(required=True) >+ partitionDevice=StringSanitizer(required=True), >+ filter=PatternSanitizer(default='.*')), > ) > def users_query(self, request): > partitionDevice = request.options['partitionDevice'] >@@ -78,11 +78,7 @@ def _users_query(self, pid, status, callbackResult, id, partition, request): > except: > pass > quotas = tools.repquota_parse(partition, callbackResult[header + 1 :]) >- result = [] >- for list_entry in quotas: >- if fnmatch(list_entry['user'], request.options['filter']): >- result.append(list_entry) >- request.status = SUCCESS >+ result = [q for q in quotas if request.options['filter'].match(q['user'])] > self.finished(request.id, result) > > @sanitize(
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 42368
: 8002