diff --git a/groups.py b/groups.py index 3ea18d170..9f6c58faa 100644 --- a/groups.py +++ b/groups.py @@ -562,7 +562,7 @@ def validate_data(ctx, data, allow_update): if group.exists(ctx, groupname) and not allow_update: errors.append('Group "{}" already exists'.format(groupname)) - # Is user admin or has catergory add privileges? + # Is user admin or has category add privileges? if not (is_admin or can_add_category): if category not in getCategories(ctx): # Insufficient permissions to add new category. @@ -571,12 +571,6 @@ def validate_data(ctx, data, allow_update): # Insufficient permissions to add new subcategory. errors.append('Subcategory {} does not exist and cannot be created due to insufficient permissions.'.format(subcategory)) - for the_user in managers + members + viewers: - if not is_internal_user(the_user): - # ensure that external users already have an iRODS account - # we do not want to be the actor that creates them - if not user.exists(ctx, the_user): - errors.append('Group {} has nonexisting external user {}'.format(groupname, the_user)) return errors diff --git a/tests/features/api/api_group.feature b/tests/features/api/api_group.feature index 36b4ed48f..a09eb526c 100644 --- a/tests/features/api/api_group.feature +++ b/tests/features/api/api_group.feature @@ -131,6 +131,7 @@ Feature: Group API And user "datamanager@yoda.test" is now a member of the group "research-csvtestgroup" And user "researcher@yoda.test" is now a member of the group "research-csvtestgroup" And user "viewer@yoda.test" is now a member of the group "research-csvtestgroup" + And user "researcher1@example.com" is now a member of the group "research-csvtestgroup" Scenario Outline: Group delete diff --git a/tests/step_defs/api/test_api_group.py b/tests/step_defs/api/test_api_group.py index 7fe67a24f..e0ae55f09 100644 --- a/tests/step_defs/api/test_api_group.py +++ b/tests/step_defs/api/test_api_group.py @@ -263,7 +263,7 @@ def then_user_update_persisted(user, new_user, group_name): @given('the Yoda API for processing csv group data API is queried', target_fixture="api_response") def api_group_import_csv_data(user): - header_and_data = "category,subcategory,groupname,manager:manager,member:member1,member:member2,viewer:viewer1\rdefault-2,default-2,csvtestgroup,datamanager@yoda.test,researcher@yoda.test,functionaladminpriv@yoda.test,viewer@yoda.test" + header_and_data = "category,subcategory,groupname,manager:manager,member:member1,member:member2,viewer:viewer1,member:member3\rdefault-2,default-2,csvtestgroup,datamanager@yoda.test,researcher@yoda.test,functionaladminpriv@yoda.test,viewer@yoda.test,researcher1@example.com" return api_request( user, "group_process_csv",