Skip to content

Commit

Permalink
Merge branch 'master' of github.com:okfn/ckan into 3028-dashboard-act…
Browse files Browse the repository at this point in the history
…ivity-stream-filtering
  • Loading branch information
Sean Hammond committed Dec 20, 2012
2 parents 170a8f2 + 08d3341 commit 9668ad3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ckan/lib/dictization/model_dictize.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import datetime

from pylons import config
from sqlalchemy.sql import select
import ckan.model

import ckan.misc as misc
import ckan.logic as logic
import ckan.plugins as plugins
import ckan.lib.helpers as h
import ckan.lib.dictization as d
import ckan.new_authz as new_authz

## package save

Expand Down Expand Up @@ -266,7 +268,7 @@ def package_dictize(pkg, context):

# Extra properties from the domain object
# We need an actual Package object for this, not a PackageRevision
if isinstance(pkg, ckan.model.PackageRevision):
if isinstance(pkg, model.PackageRevision):
pkg = model.Package.get(pkg.id)

# isopen
Expand Down Expand Up @@ -418,7 +420,7 @@ def user_dictize(user, context):

requester = context.get('user')

if not (ckan.new_authz.is_sysadmin(requester) or
if not (new_authz.is_sysadmin(requester) or
requester == user.name or
context.get('keep_sensitive_data', False)):
# If not sysadmin or the same user, strip sensible info
Expand Down

0 comments on commit 9668ad3

Please sign in to comment.