本文整理汇总了Python中Products.ATContentTypes.content.folder.ATFolder.manage_afterAdd方法的典型用法代码示例。如果您正苦于以下问题:Python ATFolder.manage_afterAdd方法的具体用法?Python ATFolder.manage_afterAdd怎么用?Python ATFolder.manage_afterAdd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Products.ATContentTypes.content.folder.ATFolder
的用法示例。
在下文中一共展示了ATFolder.manage_afterAdd方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: manage_afterAdd
# 需要导入模块: from Products.ATContentTypes.content.folder import ATFolder [as 别名]
# 或者: from Products.ATContentTypes.content.folder.ATFolder import manage_afterAdd [as 别名]
def manage_afterAdd(self, item, container):
# XXX TODO: when we're done with 2.1.x, implement this via event subscription
ATFolder.manage_afterAdd(self, item, container)
id = self.getId()
if self.fsStartField.__name__ != id:
self.fsStartField.__name__ = id
示例2: manage_afterAdd
# 需要导入模块: from Products.ATContentTypes.content.folder import ATFolder [as 别名]
# 或者: from Products.ATContentTypes.content.folder.ATFolder import manage_afterAdd [as 别名]
def manage_afterAdd(self, *args, **kwargs):
"""
"""
#log("manage_afterAdd: %s" % self)
#retVal = OrderedBaseFolder.manage_afterAdd(self, *args, **kwargs)
retVal = ATFolder.manage_afterAdd(self, *args, **kwargs)
self.syncResults('add')
return retVal
示例3: manage_afterAdd
# 需要导入模块: from Products.ATContentTypes.content.folder import ATFolder [as 别名]
# 或者: from Products.ATContentTypes.content.folder.ATFolder import manage_afterAdd [as 别名]
def manage_afterAdd(self, item, container):
#BaseFolder.manage_afterAdd(self, item, container)
#OrderedBaseFolder.manage_afterAdd(self, item, container)
ATFolder.manage_afterAdd(self, item, container)
# Create a user-defined role "ECAssignment Viewer". This role
# has the View permission in certain states (defined in
# ECAssignmentWorkflow). This can be used for model
# solutions: (1) Submit an assignment with the model
# solution. (2) Use the "Sharing" tab to assign the role
# "ECAssignment Viewer" to the users or groups who should be
# allowed to view the assignment.
#if 'ECAssignment Viewer' not in self.valid_roles():
# self.manage_defined_roles('Add Role',
# {'role': 'ECAssignment Viewer'})
# Create a user-defined role "ECAssignment Grader". The owner
# of an assignment box can use this role to delegate grading
# to other users.
#if 'ECAssignment Grader' not in self.valid_roles():
# self.manage_defined_roles('Add Role',
# {'role': 'ECAssignment Grader'})
# Plone 3: in profiles/default/rolemap.xml
# Grant the GradeAssignments permission to the "ECAssignment
# Grader" role.
# self.manage_permission(permissions.GradeAssignments,
# roles=['ECAssignment Grader',], acquire=True)
# Assign the local roles to the creator
creator = self.Creator()
roles = list(self.get_local_roles_for_userid(creator))
for role in ('ECAssignment Viewer', 'ECAssignment Grader'):
if role not in roles:
roles.append(role)
self.manage_setLocalRoles(creator, roles)
示例4: manage_afterAdd
# 需要导入模块: from Products.ATContentTypes.content.folder import ATFolder [as 别名]
# 或者: from Products.ATContentTypes.content.folder.ATFolder import manage_afterAdd [as 别名]
def manage_afterAdd(self, item, container):
ATFolder.manage_afterAdd(self, item, container)