[ckan-changes] commit/ckanextiati: 2 new changesets
Bitbucket
commits-noreply at bitbucket.org
Wed Oct 19 14:44:58 UTC 2011
2 new changesets in ckanextiati:
http://bitbucket.org/okfn/ckanextiati/changeset/820768403da2/
changeset: 820768403da2
user: amercader
date: 2011-10-19 16:42:58
summary: Fix bug in groups form
affected #: 1 file (-1 bytes)
--- a/ckanext/iati/controllers/group_iati.py Wed Oct 19 11:21:59 2011 +0100
+++ b/ckanext/iati/controllers/group_iati.py Wed Oct 19 15:42:58 2011 +0100
@@ -4,6 +4,7 @@
from ckan.lib.navl.validators import ignore_missing, not_empty
from ckan.lib.navl.dictization_functions import Invalid
+from ckan.logic.validators import ignore_not_admin
from ckan.logic.schema import group_form_schema
from ckan.logic.converters import convert_from_extras, convert_to_extras
from ckan.controllers.group import GroupController
@@ -27,6 +28,7 @@
def _form_to_db_schema(self):
schema = group_form_schema()
schema.update({
+ 'state': [ignore_not_admin],
'type': [not_empty, convert_to_extras],
'license_id': [convert_to_extras],
'publisher_iati_id': [convert_to_extras, ignore_missing],
@@ -53,6 +55,7 @@
def _db_to_form_schema(self):
schema = group_form_schema()
schema.update({
+ 'state': [ignore_not_admin],
'type': [convert_from_extras],
'license_id': [convert_from_extras],
'publisher_country': [convert_from_extras],
http://bitbucket.org/okfn/ckanextiati/changeset/8098d9ebc1c5/
changeset: 8098d9ebc1c5
user: amercader
date: 2011-10-19 16:44:39
summary: Comment out role functions in the authz plugin, as they conflict with 888ed50c098d
affected #: 1 file (-1 bytes)
--- a/ckanext/iati/authz.py Wed Oct 19 15:42:58 2011 +0100
+++ b/ckanext/iati/authz.py Wed Oct 19 15:44:39 2011 +0100
@@ -52,8 +52,9 @@
if len(package.groups) == 0:
# invalid for iati, but lets not drop our privs and pants over this.
return
- model.clear_user_roles(package)
- model.setup_default_user_roles(package, [])
+ #Commenting out as it conflicts with 888ed50c098d
+ #model.clear_user_roles(package)
+ #model.setup_default_user_roles(package, [])
self._sync_authz_groups(package)
def edit(self, package):
Repository URL: https://bitbucket.org/okfn/ckanextiati/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the ckan-changes
mailing list