diff --git a/client/src/app/App.js b/client/src/app/App.js
index d52ea248..6d327fa8 100644
--- a/client/src/app/App.js
+++ b/client/src/app/App.js
@@ -86,20 +86,24 @@ class App extends React.Component {
browserHistory.push('/admin/panel');
}
- if (this.props.session.userLevel && !this.isPathAvailableForStaff()) {
+ if (props.session.userLevel && !this.isPathAvailableForStaff(props)) {
browserHistory.push('/admin/panel');
}
+
+ if (!props.config.registration && _.includes(props.location.pathname, 'signup')) {
+ browserHistory.push('/');
+ }
}
- isPathAvailableForStaff() {
- let pathForLevel2 = _.findIndex(level2Paths, path => _.includes(this.props.location.pathname, path)) !== -1;
- let pathForLevel3 = _.findIndex(level3Paths, path => _.includes(this.props.location.pathname, path)) !== -1;
+ isPathAvailableForStaff(props) {
+ let pathForLevel2 = _.findIndex(level2Paths, path => _.includes(props.location.pathname, path)) !== -1;
+ let pathForLevel3 = _.findIndex(level3Paths, path => _.includes(props.location.pathname, path)) !== -1;
- if (this.props.session.userLevel === 1) {
+ if (props.session.userLevel === 1) {
return !pathForLevel2 && !pathForLevel3;
}
- if (this.props.session.userLevel === 2) {
+ if (props.session.userLevel === 2) {
return !pathForLevel3;
}
diff --git a/client/src/app/main/main-layout-header.js b/client/src/app/main/main-layout-header.js
index dd031535..2254590c 100644
--- a/client/src/app/main/main-layout-header.js
+++ b/client/src/app/main/main-layout-header.js
@@ -32,7 +32,7 @@ class MainLayoutHeader extends React.Component {
result = (
-
+ {this.props.config === true ? : null}
);
}
diff --git a/client/src/data/fixtures/system-fixtures.js b/client/src/data/fixtures/system-fixtures.js
index ac2a5bbd..ddff91bd 100644
--- a/client/src/data/fixtures/system-fixtures.js
+++ b/client/src/data/fixtures/system-fixtures.js
@@ -20,6 +20,7 @@ module.exports = [
'smtp-user': 'Wesa',
'maintenance-mode': false,
'allow-attachments': true,
+ 'registration': true,
'max-size': 500,
'departments': [
{id: 1, name: 'Sales Support', owners: 2},
diff --git a/client/src/data/languages/en.js b/client/src/data/languages/en.js
index 8e69269c..a7ec1983 100644
--- a/client/src/data/languages/en.js
+++ b/client/src/data/languages/en.js
@@ -186,7 +186,7 @@ export default {
'TICKET_LIST_DESCRIPTION': 'Here you can find a list of all tickets you have sent to our support team.',
'TICKETS_DESCRIPTION': 'Send ticket through our support center and get response of your doubts, suggestions and issues.',
'ARTICLES_DESCRIPTION': 'Take a look to our articles about common issues, guides and documentation.',
- 'ACCOUNT_DESCRIPTION': 'All your tickets are stored in your accounts\'s profile. Keep track off all your tickets you send to our staff team.',
+ 'ACCOUNT_DESCRIPTION': 'All your tickets are stored in your account\'s profile. Keep track of all your tickets you send to our staff team.',
'SUPPORT_CENTER_DESCRIPTION': 'Welcome to our support center. You can contact us through a tickets system. Your tickets will be answered by our staff.',
'CUSTOM_RESPONSES_DESCRIPTION': 'Custom responses are automated responses for common problems',
'MY_TICKETS_DESCRIPTION': 'Here you can view the tickets you are responsible for.',