diff --git a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/ERP5Type_getSecurityCategoryFromAssignmentTree.xml b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/ERP5Type_getSecurityCategoryFromAssignmentTree.xml index ad95fb750ab0ee021af3993b5ebdd69b6dd58eb4..18e4399573371ab8c94b279b36d2ed16de52123c 100644 --- a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/ERP5Type_getSecurityCategoryFromAssignmentTree.xml +++ b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/ERP5Type_getSecurityCategoryFromAssignmentTree.xml @@ -77,7 +77,7 @@ Differences to the stock implementation:\n \n * if category is source_project, we look for destination_project\n \n -* if category is group, we return not only the group, but also all its parents\n +* if category not strict, we return not only the category, but also all its parents\n (unless we say it is strict)\n """\n \n @@ -118,13 +118,13 @@ for assignment in person_object.contentValues(filter={\'portal_type\': \'Assignm else:\n raise RuntimeError, "Error: \'%s\' property is required in order to update person security group" % (base_category)\n category_list.append(category_dict)\n - # if it is group, we go up the hierarchy (because if you work in group/a/b/c, chances are you \n + # if not strict, we go up the hierarchy (because if you work in group/a/b/c, chances are you \n # are working in group/a/b, too :)\n - if base_category == \'group\' and not strict:\n + if not strict:\n grouplist = category_value.split(\'/\')\n for i in range(1,len(grouplist)):\n cdict = category_dict.copy()\n - cdict[\'group\'] = \'/\'.join(grouplist[:-i])\n + cdict[base_category] = \'/\'.join(grouplist[:-i])\n category_list.append(cdict)\n except RuntimeError,e:\n context.log(str(e))\n diff --git a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/ERP5Type_getSecurityCategoryMapping.xml b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/ERP5Type_getSecurityCategoryMapping.xml index 79af6423bb598db48ec03286ff057f70c7e9ac99..9c3741dd71e3585eed83f77e661c518af77df60d 100644 --- a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/ERP5Type_getSecurityCategoryMapping.xml +++ b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/ERP5Type_getSecurityCategoryMapping.xml @@ -72,13 +72,11 @@ Core security script - defines the way to get security groups of the current user.\n """\n \n -# XXX-JPS This code is quite frightening. I wonder really what it is for.\n -\n return (\n -(\'ERP5Type_getSecurityCategoryFromAssignmentTree\', [\'function\'] ),\n -(\'ERP5Type_getSecurityCategoryFromAssignmentTree\', [\'source_project\'] ),\n -(\'ERP5Type_getSecurityCategoryFromAssignmentTree\', [\'function\', \'source_project\'] ),\n -(\'ERP5Type_getSecurityCategoryFromAssignmentTree\', [\'group\'] ),\n +(\'ERP5Type_getSecurityCategoryFromAssignmentStrict\', [\'function\'] ),\n +(\'ERP5Type_getSecurityCategoryFromAssignmentStrict\', [\'source_project\'] ),\n +(\'ERP5Type_getSecurityCategoryFromAssignmentStrict\', [\'function\', \'source_project\'] ),\n +(\'ERP5Type_getSecurityCategoryFromAssignmentStrict\', [\'group\'] ),\n (\'ERP5Type_getSecurityCategoryRoot\', [\'group\']),\n )\n </string> </value> diff --git a/bt5/erp5_dms/bt/revision b/bt5/erp5_dms/bt/revision index d759b56eccdb79f5e20e72f978f8f063937b13e0..06e8971dc662a94702e1d094b4c2ba640351f945 100644 --- a/bt5/erp5_dms/bt/revision +++ b/bt5/erp5_dms/bt/revision @@ -1 +1 @@ -537 \ No newline at end of file +540 \ No newline at end of file