def set_properties(json): file = File.get(json['params']['id']) if not file or FilemanagerRights(company=get_company_from_folder(json['params']['id'])).action_is_allowed( FilemanagerRights.ACTIONS['UPLOAD']) != True: return False return File.set_properties(file, json['params']['add_all'], name=json['params']['name'], copyright_author_name=json['params']['author_name'], description=json['params']['description'])
def set_properties(json): file = File.get(json['params']['id']) if not file or EmployeeHasRightAtCompany(RIGHT_AT_COMPANY.FILES_UPLOAD).check( company_id=get_company_from_folder(json['params']['root_id']).id) is not True: return False return File.set_properties(file, json['params']['add_all'], name=json['params']['name'], copyright_author_name=json['params']['author_name'], description=json['params']['description'])
def set_properties(json): file = File.get(request.json['params']['id'], ) return File.set_properties( file, request.json['params']['add_all'], name=request.json['params']['name'], copyright_author_name=request.json['params']['author_name'], description=request.json['params']['description'])
def set_properties(json): file = File.get(json['params']['id']) if not file or not File.if_action_allowed( 'upload', get_company_from_folder(json['params']['id']).id): return False return File.set_properties( file, json['params']['add_all'], name=json['params']['name'], copyright_author_name=json['params']['author_name'], description=json['params']['description'])
def set_properties(json): file = File.get(json['params']['id']) if not file or EmployeeHasRightAtCompany( RIGHT_AT_COMPANY.FILES_UPLOAD).check( company_id=get_company_from_folder( json['params']['root_id']).id) is not True: return False return File.set_properties( file, json['params']['add_all'], name=json['params']['name'], copyright_author_name=json['params']['author_name'], description=json['params']['description'])
def set_properties(json): file = File.get(request.json['params']['id'], ) return File.set_properties(file, request.json['params']['add_all'], name=request.json['params']['name'], copyright_author_name=request.json['params']['author_name'], description=request.json['params']['description'])
def test(): file = File.get('5644d72e-a269-4001-a5de-8c3194039273') name = File.set_properties(file,False,name='None', copyright_author_name='',description='') return render_template('tmp-test.html', file=name)