MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / get_share_admins_for_record

Function get_share_admins_for_record

keepercommander/api.py:261–279  ·  view source on GitHub ↗
(params, record_uid)

Source from the content-addressed store, hash-verified

259
260
261def get_share_admins_for_record(params, record_uid): # type: (KeeperParams, str) -> Optional[List[str]]
262 if params.enterprise_ec_key:
263 if record_uid in params.record_cache:
264 if 'share_admins' in params.record_cache[record_uid]:
265 return params.record_cache[record_uid]['share_admins']
266
267 try:
268 rq = enterprise_pb2.GetSharingAdminsRequest()
269 rq.recordUid = utils.base64_url_decode(record_uid)
270 rs = communicate_rest(params, rq, 'enterprise/get_sharing_admins',
271 rs_type=enterprise_pb2.GetSharingAdminsResponse)
272 admins = [x.email for x in rs.userProfileExts if x.isShareAdminForRequestedObject]
273 except Exception as e:
274 logging.debug(e)
275 return
276 if record_uid in params.record_cache:
277 params.record_cache[record_uid]['share_admins'] = admins
278
279 return admins
280
281
282def get_shared_folder(params, shared_folder_uid): # type: (KeeperParams, str) -> Optional[SharedFolder]

Callers 1

prepare_record_v3Function · 0.85

Calls 2

communicate_restFunction · 0.85
debugMethod · 0.45

Tested by

no test coverage detected