def put_department(ret, content, *args, **kwargs): ''' 修改部门 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_put(ret, 'Department', content)
def put_role(ret, content, *args, **kwargs): ''' 修改岗位 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_put(ret, 'Role', content)
def put_authority_user(ret, content, *args, **kwargs): ''' 修改用户权限 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_put(ret, 'AuthorityUser', content)
def put_authority_department(ret, content, *args, **kwargs): ''' 修改岗位权限 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_put(ret, 'AuthorityDepartment', content)
def put_authority_role(ret, content, *args, **kwargs): ''' 修改角色权限 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_put(ret, 'AuthorityRole', content)
def put_authority_company(ret, content, *args, **kwargs): ''' 修改公司权限 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_put(ret, 'AuthorityCompany', content)
def user_role_put(ret, content, *args, **kwargs): ''' 修改账户角色 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_put(ret, 'User_Con_Role', content)
def role_department_put(ret, content, *args, **kwargs): ''' 修改部门岗位 :param ret: :param content: :param args: :param kwargs: :return: ''' return views.action_put(ret, 'Role_Con_Department', content)
def user_profile(ret, content, *args, **kwargs): ''' 修改账户详细信息 user_settings :param ret: :param content: :param args: :param kwargs: :return: ''' password = content.pop('password') password2 = content.pop('password2') User_id = content.pop('User_id') ret['errors'] = {'password2': [{'message': '两次密码输入不正确!!!', 'code': ''}]} if password or password2: if password == password2: User_obj = org_models.User.objects.filter(id=User_id).first() User_obj.set_password(password2) User_obj.save() else: return ret return views.action_put(ret, 'User', content)