Skip to content

Commit

Permalink
[#349] Remove create_roles() in create_test_data
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Mar 1, 2013
1 parent 7c83436 commit 2ad056d
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions ckan/lib/create_test_data.py
Expand Up @@ -3,7 +3,6 @@
import datetime

import ckan.model as model
import authztool

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -523,19 +522,6 @@ def create_user(cls, name='', **kwargs):
cls._create_user_without_commit(name, **kwargs)
model.Session.commit()

@classmethod
def create_roles(cls, roles):
'''Each role is a tuple (object_name, role, subject_name).
There is clever searching going on to find the objects of any type,
by name or ID. You can also use the subject_name='system'.
'''
for role_tuple in roles:
object_name, role, subject_name = role_tuple
authztool.RightsTool.make_or_remove_roles('make', object_name, role, subject_name,
except_on_error=True,
do_commit=False)
model.repo.commit_and_remove()

@classmethod
def flag_for_deletion(cls, pkg_names=[], tag_names=[], group_names=[],
user_names=[]):
Expand Down

0 comments on commit 2ad056d

Please sign in to comment.