From e16786eda4773a4f5bd91bc76cefa4c08a8d44e6 Mon Sep 17 00:00:00 2001 From: Josef Rokos Date: Mon, 29 Sep 2014 15:42:28 +0200 Subject: [PATCH] =?UTF-8?q?Opravena=20editace=20glob=C3=A1ln=C3=ADho=20nas?= =?UTF-8?q?taven=C3=AD-=20pokud=20u=C5=BEivatel=20nem=C3=A1=20pr=C3=A1va?= =?UTF-8?q?=20k=20editaci,=20vid=C3=AD=20nastaven=C3=AD=20jako=20read=20on?= =?UTF-8?q?ly.=20closes=20#141?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../isspst/ui/settings/GlobalSettingsVM.java | 4 ++- src/main/webapp/settings/global/address.zul | 26 +++++++++---------- src/main/webapp/settings/global/bank.zul | 6 ++--- src/main/webapp/settings/global/email.zul | 21 ++++++++------- .../webapp/settings/global/travelOrders.zul | 16 ++++++------ src/main/webapp/settings/globalSettings.zul | 2 +- 6 files changed, 40 insertions(+), 35 deletions(-) diff --git a/src/main/java/info/bukova/isspst/ui/settings/GlobalSettingsVM.java b/src/main/java/info/bukova/isspst/ui/settings/GlobalSettingsVM.java index 4e5db21c..2dca91f7 100644 --- a/src/main/java/info/bukova/isspst/ui/settings/GlobalSettingsVM.java +++ b/src/main/java/info/bukova/isspst/ui/settings/GlobalSettingsVM.java @@ -1,5 +1,6 @@ package info.bukova.isspst.ui.settings; +import info.bukova.isspst.Constants; import info.bukova.isspst.data.Address; import info.bukova.isspst.data.Requirement; import info.bukova.isspst.data.SettingsData; @@ -8,6 +9,7 @@ import info.bukova.isspst.mail.MailMessage; import info.bukova.isspst.services.settings.GlobalSettingsService; import info.bukova.isspst.sort.ReflectionTools; import info.bukova.isspst.ui.LocaleConverter; +import info.bukova.isspst.ui.SecurityHelper; import java.util.ArrayList; import java.util.Collections; @@ -52,7 +54,7 @@ public class GlobalSettingsVM { } public boolean isCanSave() { - return true; + return SecurityHelper.isAllGranted(Constants.ROLE_ADMIN); } public LocaleConverter getLocConverter() { diff --git a/src/main/webapp/settings/global/address.zul b/src/main/webapp/settings/global/address.zul index bad5eb7d..70dbf9d9 100644 --- a/src/main/webapp/settings/global/address.zul +++ b/src/main/webapp/settings/global/address.zul @@ -8,37 +8,37 @@