(params, record_uid)
| 259 | |
| 260 | |
| 261 | def 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 | |
| 282 | def get_shared_folder(params, shared_folder_uid): # type: (KeeperParams, str) -> Optional[SharedFolder] |
no test coverage detected