1.1 --- a/imiptools/stores/database/common.py Sun Jun 05 00:12:28 2016 +0200
1.2 +++ b/imiptools/stores/database/common.py Sun Jun 05 00:41:02 2016 +0200
1.3 @@ -825,7 +825,7 @@
1.4 "Return a list of quotas."
1.5
1.6 query = "select distinct quota from (" \
1.7 - "select quota from quota_freebusy " \
1.8 + "select distinct store_user as quota from freebusy_other " \
1.9 "union all select quota from quota_limits" \
1.10 ") as quotas"
1.11 self.cursor.execute(query)
1.12 @@ -840,7 +840,7 @@
1.13
1.14 query, values = self.get_query(
1.15 "select distinct user_group from (" \
1.16 - "select user_group from quota_freebusy :condition " \
1.17 + "select distinct other as user_group from freebusy_other :condition " \
1.18 "union all select user_group from quota_delegates :condition" \
1.19 ") as users",
1.20 columns, values)
2.1 --- a/imiptools/stores/file.py Sun Jun 05 00:12:28 2016 +0200
2.2 +++ b/imiptools/stores/file.py Sun Jun 05 00:41:02 2016 +0200
2.3 @@ -787,21 +787,8 @@
2.4
2.5 # Quota and user identity/group discovery.
2.6
2.7 - def get_quotas(self):
2.8 -
2.9 - "Return a list of quotas."
2.10 -
2.11 - return listdir(self.store_dir)
2.12 -
2.13 - def get_quota_users(self, quota):
2.14 -
2.15 - "Return a list of quota users for 'quota'."
2.16 -
2.17 - filename = self.get_object_in_store(quota, "journal")
2.18 - if not filename or not isdir(filename):
2.19 - return []
2.20 -
2.21 - return list(set(self.get_delegates(quota)).union(listdir(filename)))
2.22 + get_quotas = Store.get_users
2.23 + get_quota_users = Store.get_freebusy_others
2.24
2.25 # Delegate information for the quota.
2.26