Remove authentication from version info resource

Add new line at end of server_config.json
This commit is contained in:
itay 2019-04-23 11:54:51 +03:00
parent d486471fb2
commit 8523075494
3 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,8 @@ class VersionUpdate(flask_restful.Resource):
def __init__(self): def __init__(self):
super(VersionUpdate, self).__init__() super(VersionUpdate, self).__init__()
@jwt_required() # We don't secure this since it doesn't give out any private info and we want UI to know version
# even when not authenticated
def get(self): def get(self):
return { return {
'current_version': env.get_version(), 'current_version': env.get_version(),

View File

@ -2,4 +2,4 @@
"server_config": "standard", "server_config": "standard",
"deployment": "develop", "deployment": "develop",
"monkey_version": "1.6.2" "monkey_version": "1.6.2"
} }

View File

@ -1,8 +1,7 @@
import React from 'react'; import React from 'react';
import AuthComponent from "../AuthComponent";
import {Icon} from 'react-fa'; import {Icon} from 'react-fa';
class VersionComponent extends AuthComponent { class VersionComponent extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
@ -13,7 +12,7 @@ class VersionComponent extends AuthComponent {
} }
componentDidMount() { componentDidMount() {
this.authFetch('/api/version-update') this.fetch('/api/version-update') // This is not authenticated on purpose
.then(res => res.json()) .then(res => res.json())
.then(res => { .then(res => {
this.setState({ this.setState({