Ejemplo n.º 1
0
	def expandApplyInfo(cls, helper, vo):
		try:
			apply_info = JSONDecoder().decode(UcfUtil.getHashStr(vo, 'apply_info'))
			# TODO セキュリティブラウザの端末情報を展開 2015.09.04
			if apply_info.has_key('DeviceInfo'):
				pass
		except BaseException, e:
			logging.exception(e)
			apply_info = {}
Ejemplo n.º 2
0
	def _formatLogText(cls, helper, vo):

		screen = vo.get('screen', '')
		operation = vo.get('operation', '')

		log_records = []
		#if screen not in [UcfConfig.SCREEN_TASK, UcfConfig.SCREEN_PROFILE, UcfConfig.SCREEN_GENERALSSO]:
		if screen not in []:
			if screen not in [UcfConfig.SCREEN_DASHBOARD]:
				log_records.append(helper.getMsg('OPERATIONLOG_DETAIL_TARGET_DATA') + vo.get('target_data', ''))

		if operation == 'account_changeid':
			log_records.append(helper.getMsg('OPERATIONLOG_DETAIL_IS_UPDATE_GW_DATA') + vo.get('is_update_apps_data', ''))
		if vo.get('detail', '') != '':
			detail = JSONDecoder().decode(vo.get('detail', ''))

			if operation in ['group_addmembers', 'orgunit_addmembers']:
				if detail.has_key('members'):
					members = detail['members']
					for member in members:
						log_records.append('[email]' + member.get('email', '') + '[type]' + member.get('type', ''))

			if operation in ['group_removemembers', 'orgunit_removemembers']:
				if detail.has_key('members'):
					members = detail['members']
					for member in members:
						log_records.append('[email]' + member.get('email', ''))

			if detail.has_key('fields'):
				log_records.append(helper.getMsg('OPERATIONLOG_DETAIL_FIELDS'))
				diff_for_operation_log = detail['fields']
				for item in diff_for_operation_log:
					log_records.append('[field]' + item.get('key', '') + '[before]' + item.get('before', '') + '[after]' + item.get('after', ''))
			if detail.has_key('add_groups'):
				log_records.append(helper.getMsg('OPERATIONLOG_DETAIL_ADD_GROUPS') + UcfUtil.listToCsv(detail['add_groups']))
			if detail.has_key('del_groups'):
				log_records.append(helper.getMsg('OPERATIONLOG_DETAIL_REMOVE_GROUPS') + UcfUtil.listToCsv(detail['del_groups']))
		return '\n'.join(log_records)