Changeset View
Changeset View
Standalone View
Standalone View
pykolab/imap/__init__.py
Show All 10 Lines | |||||
# This program is distributed in the hope that it will be useful, | # This program is distributed in the hope that it will be useful, | ||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
# GNU General Public License for more details. | # GNU General Public License for more details. | ||||
# You should have received a copy of the GNU General Public License | # You should have received a copy of the GNU General Public License | ||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
# | # | ||||
from six import string_types | |||||
import logging | import logging | ||||
import re | import re | ||||
import time | import time | ||||
import socket | import socket | ||||
import sys | import sys | ||||
try: | try: | ||||
▲ Show 20 Lines • Show All 873 Lines • ▼ Show 20 Lines | def _set_kolab_mailfolder_acls(self, acls, folder=None, update=False): | ||||
for subject in acls: | for subject in acls: | ||||
log.debug( | log.debug( | ||||
_("Removing ACL rights %s for subject %s on folder " + \ | _("Removing ACL rights %s for subject %s on folder " + \ | ||||
"%s") % (acls[subject], subject, folder), level=8) | "%s") % (acls[subject], subject, folder), level=8) | ||||
self.set_acl(folder, subject, '') | self.set_acl(folder, subject, '') | ||||
return | return | ||||
if isinstance(acls, basestring): | if isinstance(acls, string_types): | ||||
acls = [ acls ] | acls = [ acls ] | ||||
old_acls = None | old_acls = None | ||||
for acl in acls: | for acl in acls: | ||||
exec("acl = %s" % (acl)) | exec("acl = %s" % (acl)) | ||||
subject = acl[0] | subject = acl[0] | ||||
rights = acl[1] | rights = acl[1] | ||||
▲ Show 20 Lines • Show All 344 Lines • Show Last 20 Lines |