当前位置: 首页>>代码示例>>Python>>正文


Python PortalFolderBase.manage_delObjects方法代码示例

本文整理汇总了Python中Products.CMFCore.PortalFolder.PortalFolderBase.manage_delObjects方法的典型用法代码示例。如果您正苦于以下问题:Python PortalFolderBase.manage_delObjects方法的具体用法?Python PortalFolderBase.manage_delObjects怎么用?Python PortalFolderBase.manage_delObjects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Products.CMFCore.PortalFolder.PortalFolderBase的用法示例。


在下文中一共展示了PortalFolderBase.manage_delObjects方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: manage_delObjects

# 需要导入模块: from Products.CMFCore.PortalFolder import PortalFolderBase [as 别名]
# 或者: from Products.CMFCore.PortalFolder.PortalFolderBase import manage_delObjects [as 别名]
 def manage_delObjects(self, ids=[], REQUEST=None):
     """We need to enforce security."""
     if isinstance(ids, basestring):
         ids = [ids]
     for id in ids:
         item = self._getOb(id)
         if not _checkPermission(permissions.DeleteObjects, item):
             raise Unauthorized, (
                 "Do not have permissions to remove this object")
     return PortalFolder.manage_delObjects(self, ids, REQUEST=REQUEST)
开发者ID:dtgit,项目名称:dtedu,代码行数:12,代码来源:BaseFolder.py

示例2: manage_delObjects

# 需要导入模块: from Products.CMFCore.PortalFolder import PortalFolderBase [as 别名]
# 或者: from Products.CMFCore.PortalFolder.PortalFolderBase import manage_delObjects [as 别名]
 def manage_delObjects(self, ids=[], REQUEST=None):
     """We need to enforce security."""
     mt = getToolByName(self, 'portal_membership')
     if type(ids) is StringType:
         ids = [ids]
     for id in ids:
         item = self._getOb(id)
         if not mt.checkPermission(Permissions.delete_objects, item):
             raise Unauthorized, (
                 "Do not have permissions to remove this object")
     return PortalFolderBase.manage_delObjects(self, ids, REQUEST=REQUEST)
开发者ID:dtgit,项目名称:dtedu,代码行数:13,代码来源:PloneFolder.py

示例3: manage_delObjects

# 需要导入模块: from Products.CMFCore.PortalFolder import PortalFolderBase [as 别名]
# 或者: from Products.CMFCore.PortalFolder.PortalFolderBase import manage_delObjects [as 别名]
def manage_delObjects(self, ids=None, REQUEST=None):
    """We need to enforce security."""
    sm = getSecurityManager()
    if not sm.checkPermission('Delete objects', self):
        raise Unauthorized(
            "Do not have permissions to remove this object")

    if ids is None:
        ids = []
    if isinstance(ids, basestring):
        ids = [ids]
    for id_ in ids:
        item = self._getOb(id_)
        if not sm.checkPermission("Delete portal content", item):
            raise Unauthorized(
                "Do not have permissions to remove this object")
    return PortalFolder.manage_delObjects(self, ids, REQUEST=REQUEST)
开发者ID:alecghica,项目名称:collective.deletepermission,代码行数:19,代码来源:del_object.py

示例4: manage_delObjects

# 需要导入模块: from Products.CMFCore.PortalFolder import PortalFolderBase [as 别名]
# 或者: from Products.CMFCore.PortalFolder.PortalFolderBase import manage_delObjects [as 别名]
def manage_delObjects(self, ids=None, REQUEST=None):
    """We need to enforce security."""
    protect_del_objects(self, ids)
    return PortalFolder.manage_delObjects(self, ids, REQUEST=REQUEST)
开发者ID:4teamwork,项目名称:collective.deletepermission,代码行数:6,代码来源:del_object.py


注:本文中的Products.CMFCore.PortalFolder.PortalFolderBase.manage_delObjects方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。