[otrs-cvs] ITSMConfigurationManagement/Kernel/Output/HTML LinkObjectITSMConfigItem.pm, 1.13, 1.13.2.1

"CVS commits notifications of OTRS.org" <[email protected]> Mon, 25 Mar 2013 19:04:18 +0000
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/ITSMConfigurationManagement/Kernel/Output/HTML
In directory lancelot:/tmp/cvs-serv15141/Kernel/Output/HTML

Modified Files:
      Tag: rel-3_0
	LinkObjectITSMConfigItem.pm 
Log Message:
Improved permission checks in LinkObject.

Author: ub

Index: LinkObjectITSMConfigItem.pm
===================================================================
RCS file: /home/cvs/ITSMConfigurationManagement/Kernel/Output/HTML/LinkObjectITSMConfigItem.pm,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -2 -u -d -r1.13 -r1.13.2.1
--- LinkObjectITSMConfigItem.pm	10 May 2011 15:22:48 -0000	1.13
+++ LinkObjectITSMConfigItem.pm	25 Mar 2013 19:04:13 -0000	1.13.2.1
@@ -1,5 +1,5 @@
 # --
 # Kernel/Output/HTML/LinkObjectITSMConfigItem.pm - layout backend module
-# Copyright (C) 2001-2011 OTRS AG, http://otrs.org/
+# Copyright (C) 2001-2013 OTRS AG, http://otrs.org/
 # --
 # $Id$
@@ -463,11 +463,5 @@
 
     # define headline
-    my @ObjectSelectList = (
-        {
-            Key      => '-',
-            Value    => $Self->{ObjectData}->{Realname},
-            Disabled => 1,
-        }
-    );
+    my @ObjectSelectList;
 
     # get class list
@@ -531,4 +525,16 @@
     }
 
+    # only add headline if there are configitem classes
+    # where the user has the permission to use them
+    if (@ObjectSelectList) {
+
+        # add headline as first array element
+        unshift @ObjectSelectList, {
+            Key      => '-',
+            Value    => $Self->{ObjectData}->{Realname},
+            Disabled => 1,
+        };
+    }
+
     return @ObjectSelectList;
 }
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log