本文整理汇总了Python中MaKaC.webinterface.user.UserListModificationBase.retrieveUsers方法的典型用法代码示例。如果您正苦于以下问题:Python UserListModificationBase.retrieveUsers方法的具体用法?Python UserListModificationBase.retrieveUsers怎么用?Python UserListModificationBase.retrieveUsers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MaKaC.webinterface.user.UserListModificationBase
的用法示例。
在下文中一共展示了UserListModificationBase.retrieveUsers方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _getPersons
# 需要导入模块: from MaKaC.webinterface.user import UserListModificationBase [as 别名]
# 或者: from MaKaC.webinterface.user.UserListModificationBase import retrieveUsers [as 别名]
def _getPersons(self):
cpAvatars, cpNewUsers, auAvatars = [], [], []
from MaKaC.services.interface.rpc import json
chairpersonDict = json.decode(self._params.get("chairperson"))
allowedUsersDict = json.decode(self._params.get("allowedUsers"))
if chairpersonDict:
cpAvatars, cpNewUsers, cpEditedAvatars = UserListModificationBase.retrieveUsers({"userList":chairpersonDict})
if allowedUsersDict :
auAvatars, auNewUsers, auEditedAvatars = UserListModificationBase.retrieveUsers({"userList":allowedUsersDict})
#raise "avt: %s, newusers: %s, edited: %s"%(map(lambda x:x.getFullName(),avatars), newUsers, editedAvatars)
return cpAvatars, cpNewUsers, auAvatars
示例2: _getPersons
# 需要导入模块: from MaKaC.webinterface.user import UserListModificationBase [as 别名]
# 或者: from MaKaC.webinterface.user.UserListModificationBase import retrieveUsers [as 别名]
def _getPersons(self):
cpAvatars, cpNewUsers, cpEditedAvatars , auAvatars, auNewUsers, auEditedAvatars = [], [], [] , [] , [] , []
from MaKaC.services.interface.rpc import json
chairpersonDict = json.decode(self._params.get("chairperson", "")) or []
allowedUsersDict = json.decode(self._params.get("allowedUsers", "")) or []
if chairpersonDict:
cpAvatars, cpNewUsers, cpEditedAvatars = UserListModificationBase.retrieveUsers({"userList":chairpersonDict})
if allowedUsersDict :
auAvatars, auNewUsers, auEditedAvatars = UserListModificationBase.retrieveUsers({"userList":allowedUsersDict})
return cpAvatars, cpNewUsers, cpEditedAvatars, auAvatars
示例3: _getAllowedUsers
# 需要导入模块: from MaKaC.webinterface.user import UserListModificationBase [as 别名]
# 或者: from MaKaC.webinterface.user.UserListModificationBase import retrieveUsers [as 别名]
def _getAllowedUsers(self, params):
auAvatars = []
from MaKaC.services.interface.rpc import json
allowedUsersDict = json.decode(params.get("allowedUsers"))
if allowedUsersDict :
auAvatars, auNewUsers, auEditedAvatars = UserListModificationBase.retrieveUsers({"allowedUserList":allowedUsersDict}, "allowedUserList")
return auAvatars
示例4: _getPersons
# 需要导入模块: from MaKaC.webinterface.user import UserListModificationBase [as 别名]
# 或者: from MaKaC.webinterface.user.UserListModificationBase import retrieveUsers [as 别名]
def _getPersons(self):
from MaKaC.services.interface.rpc import json
allowedUsersDict = json.decode(self._params.get("allowedUsers") or "[]") or []
return UserListModificationBase.retrieveUsers({"userList": allowedUsersDict})[0] if allowedUsersDict else []