summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2017-06-21 09:47:47 +0300
committerLauri Ojansivu <x@xet7.org>2017-06-21 09:47:47 +0300
commit060f11758dbac82801b0ff5e7e7622456f1b0894 (patch)
tree40fe2670428ca99dc8f11f54c5f7746cb5882864
parent848d3e076ef9ed5b1d9b14584251a0a329ac150d (diff)
parent974fca217146e11e9d860553e2363902e90e9aa7 (diff)
downloadwekan-060f11758dbac82801b0ff5e7e7622456f1b0894.tar.gz
wekan-060f11758dbac82801b0ff5e7e7622456f1b0894.tar.bz2
wekan-060f11758dbac82801b0ff5e7e7622456f1b0894.zip
Merge branch 'nztqa-fix-admin_panel_link' into devel
Fix Admin Panel link available to all users, only link is hidden. Thanks to nztqa ! Closes #1048
-rw-r--r--CHANGELOG.md1
-rw-r--r--client/components/settings/settingBody.jade35
-rw-r--r--i18n/en.i18n.json3
3 files changed, 22 insertions, 17 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5a2aabe8..a89c3192 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,6 +11,7 @@ This release adds the following new features:
and fixes the following bugs:
+* [Fix Admin Panel link available to all users, only link is hidden](https://github.com/wekan/wekan/pull/1076);
* [Fix IE 11 drag board to scroll](https://github.com/wekan/wekan/pull/1052);
* [Fix Export Wekan board](https://github.com/wekan/wekan/pull/1067);
* [Fix "W" shortcut binding](https://github.com/wekan/wekan/pull/1066);
diff --git a/client/components/settings/settingBody.jade b/client/components/settings/settingBody.jade
index e99f52eb..1c6e3b7f 100644
--- a/client/components/settings/settingBody.jade
+++ b/client/components/settings/settingBody.jade
@@ -1,21 +1,24 @@
template(name="setting")
.setting-content
- .content-title
- span {{_ 'settings'}}
- .content-body
- .side-menu
- ul
- li.active
- a.js-setting-menu(data-id="registration-setting") {{_ 'registration'}}
- li
- a.js-setting-menu(data-id="email-setting") {{_ 'email'}}
- .main-body
- if loading.get
- +spinner
- else if generalSetting.get
- +general
- else if emailSetting.get
- +email
+ unless currentUser.isAdmin
+ | {{_ 'error-notAuthorized'}}
+ else
+ .content-title
+ span {{_ 'settings'}}
+ .content-body
+ .side-menu
+ ul
+ li.active
+ a.js-setting-menu(data-id="registration-setting") {{_ 'registration'}}
+ li
+ a.js-setting-menu(data-id="email-setting") {{_ 'email'}}
+ .main-body
+ if loading.get
+ +spinner
+ else if generalSetting.get
+ +general
+ else if emailSetting.get
+ +email
template(name="general")
ul#registration-setting.setting-detail
diff --git a/i18n/en.i18n.json b/i18n/en.i18n.json
index 461cc478..122d0b8d 100644
--- a/i18n/en.i18n.json
+++ b/i18n/en.i18n.json
@@ -354,5 +354,6 @@
"invitation-code": "Invitation Code",
"email-invite-register-subject": "__inviter__ sent you an invitation",
"email-invite-register-text": "Dear __user__,\n\n__inviter__ invites you to Wekan for collaborations.\n\nPlease follow the link below:\n__url__\n\nAnd your invitation code is: __icode__\n\nThanks.",
- "error-invitation-code-not-exist": "Invitation code doesn't exist"
+ "error-invitation-code-not-exist": "Invitation code doesn't exist",
+ "error-notAuthorized": "You are not authorized to view this page."
}