Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HeuristicLab.Hive.Server.Console-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HeuristicLab.Hive.Server.Console-3.2.csproj	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HeuristicLab.Hive.Server.Console-3.2.csproj	(revision 2065)
@@ -122,4 +122,10 @@
     </Compile>
     <Compile Include="HiveServerConsolePlugin.cs" />
+    <Compile Include="LogonDlg.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="LogonDlg.Designer.cs">
+      <DependentUpon>LogonDlg.cs</DependentUpon>
+    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <EmbeddedResource Include="AddGroup.resx">
@@ -140,4 +146,7 @@
       <DependentUpon>HiveServerManagementConsole.cs</DependentUpon>
       <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <EmbeddedResource Include="LogonDlg.resx">
+      <DependentUpon>LogonDlg.cs</DependentUpon>
     </EmbeddedResource>
     <EmbeddedResource Include="Properties\Resources.resx">
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.Designer.cs	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.Designer.cs	(revision 2065)
@@ -45,4 +45,5 @@
     /// </summary>
     private void InitializeComponent() {
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HiveServerConsole));
       this.gbConfiguration = new System.Windows.Forms.GroupBox();
       this.lblPort = new System.Windows.Forms.Label();
@@ -57,6 +58,9 @@
       this.tbPwd = new System.Windows.Forms.TextBox();
       this.lblError = new System.Windows.Forms.Label();
+      this.pictureBox1 = new System.Windows.Forms.PictureBox();
+      this.btnCancel = new System.Windows.Forms.Button();
       this.gbConfiguration.SuspendLayout();
       this.gpUser.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
       this.SuspendLayout();
       // 
@@ -67,5 +71,5 @@
       this.gbConfiguration.Controls.Add(this.tbPort);
       this.gbConfiguration.Controls.Add(this.tbIp);
-      this.gbConfiguration.Location = new System.Drawing.Point(12, 100);
+      this.gbConfiguration.Location = new System.Drawing.Point(188, 100);
       this.gbConfiguration.Name = "gbConfiguration";
       this.gbConfiguration.Size = new System.Drawing.Size(283, 82);
@@ -110,5 +114,5 @@
       // btnLogin
       // 
-      this.btnLogin.Location = new System.Drawing.Point(179, 188);
+      this.btnLogin.Location = new System.Drawing.Point(355, 193);
       this.btnLogin.Name = "btnLogin";
       this.btnLogin.Size = new System.Drawing.Size(116, 23);
@@ -125,5 +129,5 @@
       this.gpUser.Controls.Add(this.lblUsername);
       this.gpUser.Controls.Add(this.tbPwd);
-      this.gpUser.Location = new System.Drawing.Point(12, 12);
+      this.gpUser.Location = new System.Drawing.Point(188, 12);
       this.gpUser.Name = "gpUser";
       this.gpUser.Size = new System.Drawing.Size(283, 82);
@@ -171,9 +175,30 @@
       this.lblError.AutoSize = true;
       this.lblError.ForeColor = System.Drawing.Color.Red;
-      this.lblError.Location = new System.Drawing.Point(16, 238);
+      this.lblError.Location = new System.Drawing.Point(12, 193);
       this.lblError.Name = "lblError";
       this.lblError.Size = new System.Drawing.Size(0, 13);
       this.lblError.TabIndex = 5;
       // 
+      // pictureBox1
+      // 
+      this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
+      this.pictureBox1.Location = new System.Drawing.Point(12, 12);
+      this.pictureBox1.Name = "pictureBox1";
+      this.pictureBox1.Size = new System.Drawing.Size(170, 170);
+      this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+      this.pictureBox1.TabIndex = 8;
+      this.pictureBox1.TabStop = false;
+      // 
+      // btnCancel
+      // 
+      this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+      this.btnCancel.Location = new System.Drawing.Point(259, 193);
+      this.btnCancel.Name = "btnCancel";
+      this.btnCancel.Size = new System.Drawing.Size(90, 23);
+      this.btnCancel.TabIndex = 9;
+      this.btnCancel.Text = "&Cancel";
+      this.btnCancel.UseVisualStyleBackColor = true;
+      this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
+      // 
       // HiveServerConsole
       // 
@@ -181,11 +206,17 @@
       this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
       this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.ClientSize = new System.Drawing.Size(311, 225);
+      this.BackColor = System.Drawing.Color.White;
+      this.CancelButton = this.btnCancel;
+      this.ClientSize = new System.Drawing.Size(482, 226);
+      this.Controls.Add(this.btnCancel);
+      this.Controls.Add(this.pictureBox1);
       this.Controls.Add(this.lblError);
       this.Controls.Add(this.gpUser);
       this.Controls.Add(this.btnLogin);
       this.Controls.Add(this.gbConfiguration);
+      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
       this.Name = "HiveServerConsole";
-      this.Text = "Server Console";
+      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+      this.Text = "Server Console Logon";
       this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.HiveServerConsole_KeyPress);
       this.gbConfiguration.ResumeLayout(false);
@@ -193,4 +224,5 @@
       this.gpUser.ResumeLayout(false);
       this.gpUser.PerformLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
       this.ResumeLayout(false);
       this.PerformLayout();
@@ -212,4 +244,6 @@
     private System.Windows.Forms.TextBox tbPwd;
     private System.Windows.Forms.Label lblError;
+    private System.Windows.Forms.PictureBox pictureBox1;
+    private System.Windows.Forms.Button btnCancel;
   }
 }
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.cs	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.cs	(revision 2065)
@@ -33,4 +33,5 @@
 using System.Security.Cryptography;
 using System.Net;
+using System.Threading;
 
 namespace HeuristicLab.Hive.Server.ServerConsole {
@@ -42,8 +43,10 @@
     public HiveServerConsole() {
       InitializeComponent();
+#if(DEBUG)
       tbIp.Text = "10.20.53.1";
       tbPort.Text = WcfSettings.GetDefaultPort().ToString();
       tbUserName.Text = "test45";
       tbPwd.Text = "test";
+#endif
     }
 
@@ -70,7 +73,5 @@
         information.closeFormEvent += new closeForm(EnableForm);
         information.Show();
-      } else {
-        lblError.Text = "Problem with login";
-      }
+      } 
     }
 
@@ -81,40 +82,71 @@
     /// <returns></returns>
     private bool IsValid() {
-      if ((tbUserName.Text != "") &&
-          (tbPwd.Text != "") &&
-          (tbIp.Text != "") &&
-          (tbPort.Text != "")) {
+      Thread t = new Thread(new ThreadStart(ShowWaitDlg));
+      if (IsFormValidated()) {
+        IPAddress ipAdress = IPAddress.Parse(tbIp.Text);
+        int port = int.Parse(tbPort.Text);
+        IServerConsoleFacade scf = ServiceLocator.GetServerConsoleFacade();
         try {
-          IPAddress ipAdress;
-          int port;
-          if ((IPAddress.TryParse(tbIp.Text, out ipAdress)) &&
-            int.TryParse(tbPort.Text, out port)) {
-            IServerConsoleFacade scf = ServiceLocator.GetServerConsoleFacade();
-            Response resp = scf.Login(tbUserName.Text, tbPwd.Text);
-            string str = resp.StatusMessage;
-            if (resp.StatusMessage != "Logged in") {
-              return false;
-            }
-          } else {
-            lblError.Text = "IP or Port not valid";
-          }
+          lblError.Text = "Trying to logon...";
+          t.Start();
+          Response resp = scf.Login(tbUserName.Text, tbPwd.Text);
+          t.Abort();
+          if (resp.StatusMessage == "Logged in") return true;
+          lblError.Text = resp.StatusMessage;
         }
         catch (Exception ex) {
-          lblError.Text = "Server not online";
+          //login failed
+          lblError.Text = "Logon failed!";
+          t.Abort();
           return false;
         }
-        return true;
-      } else {
-        if (tbUserName.Text == "") {
-          lblError.Text = "Please type in Username";
-        } else if (tbPwd.Text == "") {
-          lblError.Text = "Please type in Password";
-        } else if (tbPort.Text == "") {
-          lblError.Text = "Please type in Port";
-        } else if (tbIp.Text == "") {
-          lblError.Text = "Please type in IP-Adress";
-        }
-        return false;
       }
+      //validation failed
+      t.Abort();
+      return false;
+    }
+
+    private void ShowWaitDlg() {
+      LogonDlg dlg = new LogonDlg();
+      dlg.ShowDialog();
+    }
+
+    /// <summary>
+    /// Validates the form.
+    /// </summary>
+    /// <returns></returns>
+    private bool IsFormValidated() {
+      bool isValid = true;
+      if (String.IsNullOrEmpty(tbUserName.Text)) {
+        lblError.Text = "Please type in Username.";
+        isValid = false;
+      }
+      if (String.IsNullOrEmpty(tbPwd.Text)) {
+        lblError.Text = "Please type in Password.";
+        isValid = false;
+      }
+      if (String.IsNullOrEmpty(tbIp.Text)) {
+        lblError.Text = "Please type in Port.";
+        isValid = false;
+      }
+      if (String.IsNullOrEmpty(tbPort.Text)) {
+        lblError.Text = "Please type in IP-Address.";
+        isValid = false;
+      }
+      try {
+        int.Parse(tbPort.Text);
+      }
+      catch (Exception ex) {
+        isValid = false;
+        lblError.Text = "Please verify entered Port.";
+      }
+      try {
+        IPAddress.Parse(tbIp.Text);
+      }
+      catch (Exception ex) {
+        isValid = false;
+        lblError.Text = "Please verify entered IP address.";
+      }
+      return isValid;
     }
 
@@ -124,5 +156,5 @@
         ServiceLocator.ShutDownFacade();
         if (error == true) {
-          lblError.Text = "Something went wrong with the server";
+          lblError.Text = "Establishing server connection failed.";
         }
       }
@@ -134,4 +166,8 @@
       }
     }
+
+    private void btnCancel_Click(object sender, EventArgs e) {
+      Dispose();
+    }
   }
 }
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.resx
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.resx	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/HiveServerConsole.resx	(revision 2065)
@@ -118,3 +118,53 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        R0lGODlh7gDTAPcAAAAAAIAAAACAAICAAAAAgIAAgACAgMDAwMDcwKbK8AQEBAgICAwMDBERERYWFhwc
+        HCIiIikpKVVVVU1NTUJCQjk5Of98gP9QUNYAk8zs/+/Wxufn1q2pkDMAAGYAAJkAAMwAAAAzADMzAGYz
+        AJkzAMwzAP8zAABmADNmAGZmAJlmAMxmAP9mAACZADOZAGaZAJmZAMyZAP+ZAADMADPMAGbMAJnMAMzM
+        AP/MAGb/AJn/AMz/AAAAMzMAM2YAM5kAM8wAM/8AMwAzMzMzM2YzM5kzM8wzM/8zMwBmMzNmM2ZmM5lm
+        M8xmM/9mMwCZMzOZM2aZM5mZM8yZM/+ZMwDMMzPMM2bMM5nMM8zMM//MMzP/M2b/M5n/M8z/M///MwAA
+        ZjMAZmYAZpkAZswAZv8AZgAzZjMzZmYzZpkzZswzZv8zZgBmZjNmZmZmZplmZsxmZgCZZjOZZmaZZpmZ
+        ZsyZZv+ZZgDMZjPMZpnMZszMZv/MZgD/ZjP/Zpn/Zsz/Zv8AzMwA/wCZmZkzmZkAmcwAmQAAmTMzmWYA
+        mcwzmf8AmQBmmTNmmWYzmZlmmcxmmf8zmTOZmWaZmZmZmcyZmf+ZmQDMmTPMmWbMZpnMmczMmf/MmQD/
+        mTP/mWbMmZn/mcz/mf//mQAAzDMAmWYAzJkAzMwAzAAzmTMzzGYzzJkzzMwzzP8zzABmzDNmzGZmmZlm
+        zMxmzP9mmQCZzDOZzGaZzJmZzMyZzP+ZzADMzDPMzGbMzJnMzMzMzP/MzAD/zDP/zGb/mZn/zMz/zP//
+        zDMAzGYA/5kA/wAzzDMz/2Yz/5kz/8wz//8z/wBm/zNm/2ZmzJlm/8xm//9mzACZ/zOZ/2aZ/5mZ/8yZ
+        //+Z/wDM/zPM/2bM/5nM/8zM///M/zP//2b/zJn//8z///9mZmb/Zv//ZmZm//9m/2b//6UAIV9fX3d3
+        d4aGhpaWlsvLy7KystfX193d3ePj4+rq6vHx8fj4+P/78KCgpICAgP8AAAD/AP//AAAA//8A/wD/////
+        /ywAAAAA7gDTAAAI/wD/CRxIsKDBgwgTKlzIsKFDhPUydEtAsWKGDPUeatzIsaPHjyBDihxJMEPFkygp
+        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
+        ADs=
+</value>
+  </data>
 </root>
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/LogonDlg.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/LogonDlg.Designer.cs	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/LogonDlg.Designer.cs	(revision 2065)
@@ -0,0 +1,76 @@
+﻿namespace HeuristicLab.Hive.Server.ServerConsole {
+  partial class LogonDlg {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LogonDlg));
+      this.pictureBox1 = new System.Windows.Forms.PictureBox();
+      this.label1 = new System.Windows.Forms.Label();
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // pictureBox1
+      // 
+      this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
+      this.pictureBox1.Location = new System.Drawing.Point(12, 12);
+      this.pictureBox1.Name = "pictureBox1";
+      this.pictureBox1.Size = new System.Drawing.Size(97, 77);
+      this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
+      this.pictureBox1.TabIndex = 0;
+      this.pictureBox1.TabStop = false;
+      // 
+      // label1
+      // 
+      this.label1.AutoSize = true;
+      this.label1.Font = new System.Drawing.Font("Segoe UI", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+      this.label1.ForeColor = System.Drawing.Color.White;
+      this.label1.Location = new System.Drawing.Point(115, 37);
+      this.label1.Name = "label1";
+      this.label1.Size = new System.Drawing.Size(276, 25);
+      this.label1.TabIndex = 1;
+      this.label1.Text = "Connecting... Please stand by.";
+      // 
+      // LogonDlg
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.BackColor = System.Drawing.Color.RoyalBlue;
+      this.ClientSize = new System.Drawing.Size(450, 101);
+      this.Controls.Add(this.label1);
+      this.Controls.Add(this.pictureBox1);
+      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+      this.Name = "LogonDlg";
+      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
+      this.Text = "LogonDlg";
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.PictureBox pictureBox1;
+    private System.Windows.Forms.Label label1;
+  }
+}
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/LogonDlg.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/LogonDlg.cs	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/LogonDlg.cs	(revision 2065)
@@ -0,0 +1,16 @@
+﻿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+
+namespace HeuristicLab.Hive.Server.ServerConsole {
+  public partial class LogonDlg : Form {
+    public LogonDlg() {
+      InitializeComponent();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Hive.Server.Console/3.2/LogonDlg.resx
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Console/3.2/LogonDlg.resx	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Console/3.2/LogonDlg.resx	(revision 2065)
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+  <data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+    <value>
+        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
+</value>
+  </data>
+</root>
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissionManager.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissionManager.cs	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissionManager.cs	(revision 2065)
@@ -0,0 +1,87 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Security.Contracts.Interfaces;
+using HeuristicLab.DataAccess;
+using HeuristicLab.Security.Contracts.BusinessObjects;
+using HeuristicLab.Hive.Contracts.BusinessObjects;
+using HeuristicLab.Hive.Contracts.Interfaces;
+using HeuristicLab.Hive.Contracts;
+using HeuristicLab.Hive.Server.Core.InternalInterfaces;
+using System.ServiceModel;
+
+namespace HeuristicLab.Hive.Server.Core {
+  public class HivePermissionManager : IHivePermissionManager {
+
+    private IJobManager jobManager = ServiceLocator.GetJobManager();
+    
+    private IPermissionManager permManager = ServiceLocator.GetPermissionManager();
+
+    private IClientManager clientManager = ServiceLocator.GetClientManager();
+
+    private PermissionCollection permissions = HivePermissions.GetPermissions();
+    private PolicyCollection policyCollection = HivePermissions.GetPolicies();
+
+    /// <summary>
+    /// Authenticates an user and returns a valid guid if success.
+    /// </summary>
+    /// <param name="username"></param>
+    /// <param name="password"></param>
+    /// <returns></returns>
+    public Guid Login(string username, string password) {
+      return permManager.Authenticate(username, password);
+    }
+
+    /// <summary>
+    /// Checks user permission against predefined policy.
+    /// </summary>
+    /// <param name="policyName">Policy Name defines the action.</param>
+    /// <param name="sessionID">Session ID identifies a currently logged on user.</param>
+    /// <param name="entityID">Entity ID can be some resource or emtpy.</param>
+    public void Authorize(string policyName, Guid sessionID, Guid entityID) {
+      //check if this policy has a permission with 'ANY' scope defined
+      Permission p = policyCollection[policyName].GetPermissionByContext("Any");
+      
+      //check if user has 'xxx.Any' permission
+      if (p != null)
+        if (CheckPermission(sessionID, p.Id, entityID)) return;
+      
+      //check if this policy has a permission with 'PROJECT' scope defined
+      p = policyCollection[policyName].GetPermissionByContext("Project");
+      //check if user has 'xxx.Project' permission
+      if (p != null)
+        if (CheckPermission(sessionID, p.Id, jobManager.GetJobById(entityID).Obj.Project.Id)) return;
+
+      //check if this policy has a permission with 'OWNER' scope defined
+      p = policyCollection[policyName].GetPermissionByContext("User");
+      //check if user has 'xxx.Owner' permission
+      if (p != null)
+        if (CheckPermission(sessionID, p.Id, jobManager.GetJobById(entityID).Obj.UserId)) return;
+      //throw an exception when user access fails
+      throw new PermissionException(policyName);
+    }
+
+    /// <summary>
+    /// Checks if a user has permission for a specified action.
+    /// </summary>
+    /// <param name="sessionID">The current session.</param>
+    /// <param name="actionID">A pre-defined action that requires permission.</param>
+    /// <param name="entityID">A resource (Job,...)</param>
+    /// <returns></returns>
+    public bool CheckPermission(Guid sessionID, Guid actionID, Guid entityId) {
+      bool hasPerm = permManager.CheckPermission(sessionID, actionID, entityId);
+      PermissionCollection pc = HivePermissions.GetPermissions();
+      if (!hasPerm)
+          if (CheckPermissionHelper(sessionID, actionID, entityId)) return true;
+      return hasPerm;
+    }
+
+    private bool CheckPermissionHelper(Guid sessionId, Guid actionId, Guid entityId) {
+      IList<ClientGroup> groups = clientManager.GetAllGroupsOfResource(entityId).Obj;
+      foreach (ClientGroup group in groups)
+        if (CheckPermission(sessionId, actionId, group.Id)) return true;
+      return false;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissionPolicy.xml
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissionPolicy.xml	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissionPolicy.xml	(revision 2065)
@@ -0,0 +1,62 @@
+﻿<?xml version="1.0" encoding="utf-8" ?>
+<Policies>
+  <Policy name="AccessClients">
+    <Permission name="HivePermissions.Usermanagement.Client.Read"/>
+  </Policy>
+  <Policy name="AccessClientGroup">
+    <Permission name="HivePermissions.Usermanagement.ClientGroup.Read"/>
+  </Policy>
+  <Policy name="AccessUserGroup">
+    <Permission name="HivePermissions.Usermanagement.UserGroup.Read"/>
+  </Policy>
+  <Policy name="AccessProjects">
+    <Permission name="HivePermissions.ResourceManagement.Project.Read"/>
+  </Policy>
+  <Policy name="DeleteProjects">
+    <Permission name="HivePermissions.ResourceManagement.Project.Delete"/>
+  </Policy>
+  <Policy name="ChangeProjects">
+    <Permission name="HivePermissions.ResourceManagement.Project.Update"/>
+  </Policy>
+  <Policy name="DeleteClientGroup">
+    <Permission name="HivePermissions.Usermanagement.ClientGroup.Delete"/>
+  </Policy>
+  <Policy name="AccessJobs">
+    <Permission priority="1" name="HivePermissions.Jobmanagement.Read.Any" context="Any"/>
+    <Permission priority="2" name="HivePermissions.Jobmanagement.Read.ProjectOnly" context="Project"/>
+    <Permission priority="3" name="HivePermissions.Jobmanagement.Read.OwnedOnly" context="User"/>
+  </Policy>
+  <Policy name="AddClientGroup">
+    <Permission name="HivePermissions.Usermanagement.ClientGroup.Create"/>
+  </Policy>
+  <Policy name="AddJob">
+    <Permission priority="1" name="HivePermissions.Jobmanagement.Create.Any" context="Any"/>
+    <Permission priority="2" name="HivePermissions.Jobmanagement.Create.ProjectOnly" context="Project"/>
+  </Policy>
+  <Policy name="AddResource">
+    <Permission priority="1" name="HivePermissions.Jobmanagement.Assign.ToAnyResource" context="Any"/>
+    <Permission priority="2" name="HivePermissions.Jobmanagement.Assign.ToProject" context="Project"/>
+  </Policy>
+  <Policy name="AccessStatistics">
+    <Permission priority="1" name="HivePermissions.Jobmanagement.Read.Any" context="Any"/>
+    <Permission priority="2" name="HivePermissions.Jobmanagement.Read.ProjectOnly" context="Project"/>
+    <Permission priority="3" name="HivePermissions.Jobmanagement.Read.OwnedOnly" context="User"/>
+  </Policy>
+  <Policy name="AccessJobResults">
+    <Permission priority="1" name="HivePermissions.Jobmanagement.Read.Any" context="Any"/>
+    <Permission priority="2" name="HivePermissions.Jobmanagement.Read.ProjectOnly" context="Project"/>
+    <Permission priority="3" name="HivePermissions.Jobmanagement.Read.OwnedOnly" context="User"/>
+  </Policy>
+  <Policy name="AbortJob">
+    <Permission priority="1" name="HivePermissions.Jobmanagement.Abort.Any" context="Any"/>
+    <Permission priority="2" name="HivePermissions.Jobmanagement.Abort.ProjectOnly" context="Project"/>
+    <Permission priority="3" name="HivePermissions.Jobmanagement.Abort.OwnedOnly" context="User"/>
+  </Policy>
+
+  <Policy name="RemoveJob">
+    <Permission priority="1" name="HivePermissions.Jobmanagement.Delete.Any" context="Any"/>
+    <Permission priority="2" name="HivePermissions.Jobmanagement.Delete.ProjectOnly" context="Project"/>
+    <Permission priority="3" name="HivePermissions.Jobmanagement.Delete.OwnedOnly" context="User"/>
+  </Policy>
+  
+</Policies>
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissionSet.xml
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissionSet.xml	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissionSet.xml	(revision 2065)
@@ -0,0 +1,184 @@
+﻿<?xml version="1.0" encoding="utf-8" ?>
+<Permissions>
+  <Permission name="HivePermissions.Jobmanagement.Create.Any">
+    <ID>A477BEA9-9C05-477f-AD9E-F76C510DDB0B</ID>
+    <Description>Add any job.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name="HivePermissions.Jobmanagement.Create.ProjectOnly">
+    <ID>95276EA1-F97F-4827-B5D0-AE326856585E</ID>
+    <Description>Add only project-related job.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Jobmanagement.Create.OwnedOnly">
+    <ID>1C47301B-4187-416f-B113-DA433448AA2E</ID>
+    <Description>Add private jobs only.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Jobmanagement.Assign.ToAnyResource">
+    <ID>48DBBEE7-53FC-4c23-B2C3-5244A5BD7385</ID>
+    <Description>Assign job to any resource.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Jobmanagement.Assign.ToProject">
+    <ID>34267865-551F-4faf-BAA8-D6821B116EBC</ID>
+    <Description>Assign job to a specific project.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Jobmanagement.Abort.Any">
+    <ID>C6EB36BE-2BE2-40f2-8440-7750759DFD79</ID>
+    <Description>Abort any running job.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Jobmanagement.Abort.ProjectOnly">
+    <ID>0E4C2FB1-DFAE-4b1d-B54A-4BD64D7BF905</ID>
+    <Description>Abort only jobs belonging to a specific project.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Jobmanagement.Abort.OwnedOnly">
+    <ID>D7C0C293-78E5-44cf-9785-7E2840BFF1AE</ID>
+    <Description>Abort only jobs belonging to self.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Jobmanagement.Delete.Any">
+    <ID>EBD4CF61-CD1B-4d61-BD8A-9CEC2174E50F</ID>
+    <Description>Delete any jobs.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Jobmanagement.Delete.ProjectOnly">
+    <ID>04C921A6-8F3E-4add-B6F1-E79C5E1C0724</ID>
+    <Description>Delete only jobs belonging to a specific project.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Jobmanagement.Delete.OwnedOnly">
+    <ID>D4F67946-1013-4d84-8B8F-0EA2E9A3E0D4</ID>
+    <Description>Delete only own jobs.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Jobmanagement.Read.Any">
+    <ID>E9FBDB1B-C532-49ad-AE1E-BDC33576F4E5</ID>
+    <Description>Read/Get any job.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Jobmanagement.Read.ProjectOnly">
+    <ID>C778C27F-BAA6-4aed-8495-015A0923E0ED</ID>
+    <Description>Read/Get only jobs belonging to a specific project.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Jobmanagement.Read.OwnedOnly">
+    <ID>022B7792-8CED-4f40-9B55-5BBB892338B4</ID>
+    <Description>Read/Get only owned jobs.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.PermissionManagement.Permission.Grant">
+    <ID>5A1A98DE-04CE-4316-9BCA-BBE833EC4E74</ID>
+    <Description>Grant a permission.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.PermissionManagement.Permission.Revoke">
+    <ID>50A3A44F-085C-47c2-AB95-DDA90CEE38B0</ID>
+    <Description>Revoke a permission.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.Client.Create">
+    <ID>90A00F60-1AC2-4928-8EC3-D7667E08D849</ID>
+    <Description>Create new client.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.Client.Read">
+    <ID>5B2AF000-920C-4955-BC27-8EA3EAA14EC6</ID>
+    <Description>Read/Get a client.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.Client.Update">
+    <ID>072CC90A-5831-4ff1-8D2E-C1084AB601DB</ID>
+    <Description>Update a client.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.Client.Delete">
+    <ID>EE39299A-D138-4ec8-89FE-55619FC3C35A</ID>
+    <Description>Delete a client.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.ClientGroup.Create">
+    <ID>134AD38F-8875-4e74-A7B9-F3366B440752</ID>
+    <Description>Create/Add a clientgroup.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.ClientGroup.Read">
+    <ID>3A43FA6F-CB4F-48fc-BB5C-631D1F09AFDA</ID>
+    <Description>Read/Get a clientgroup.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.ClientGroup.Update">
+    <ID>46128AD3-C3E9-4605-B537-45CDB8276E44</ID>
+    <Description>Update a clientgroup.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.ClientGroup.Delete">
+    <ID>6F2BB5DE-3AE9-4108-B537-362F311BAD8A</ID>
+    <Description>Update a clientgroup.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.User.Create">
+    <ID>7681347C-A7FF-4895-AE14-8454A7E05FCA</ID>
+    <Description>Create an user.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.User.Read">
+    <ID>48168F0B-3F76-4e2c-859F-71DDF0B4D4A4</ID>
+    <Description>Get an user.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.User.Update">
+    <ID>F44FEC19-5CEE-4f24-8B8C-EDE977DBA154</ID>
+    <Description>Update an user.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.User.Delete">
+    <ID>DA8F0ECB-97C2-485c-81D7-1A20B725EA47</ID>
+    <Description>Delete an user.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.UserGroup.Create">
+    <ID>D783D5E5-3DE5-465f-B6EF-A2E6BFA153DF</ID>
+    <Description>Create an user.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.UserGroup.Read">
+    <ID>16006FA7-C5A9-4185-8724-A2722F01A24A</ID>
+    <Description>Get an user.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.UserGroup.Update">
+    <ID>AA2F764A-A300-4827-B1DE-BE36CE38A546</ID>
+    <Description>Update an user.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.Usermanagement.UserGroup.Delete">
+    <ID>6A58925D-03C2-410a-A145-1B5BEDA7FB4A</ID>
+    <Description>Delete an user.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.ResourceManagement.Project.Create">
+    <ID>FA6C3DD1-3D51-4ed5-8C78-F52C4682009A</ID>
+    <Description>Create a project.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.ResourceManagement.Project.Read">
+    <ID>BA0EBF0A-FD0E-4439-95B2-ADF74EE7D951</ID>
+    <Description>Get a project.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.ResourceManagement.Project.Update">
+    <ID>963B74EF-1673-4eb6-969D-C16E6DBA68FA</ID>
+    <Description>Update a project.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+  <Permission name ="HivePermissions.ResourceManagement.Project.Delete">
+    <ID>AC78B93B-66F2-42b2-860E-976C825B11B7</ID>
+    <Description>Delete a project.</Description>
+    <Plugin>HeuristicLab.Hive</Plugin>
+  </Permission>
+
+</Permissions>
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissionSet.xsd
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissionSet.xsd	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissionSet.xsd	(revision 2065)
@@ -0,0 +1,19 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+  <xs:element name="Permissions">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element maxOccurs="unbounded" name="Permission">
+          <xs:complexType>
+            <xs:sequence>
+              <xs:element name="ID" type="xs:string" />
+              <xs:element name="Description" type="xs:string" />
+              <xs:element name="Plugin" type="xs:string" />
+            </xs:sequence>
+            <xs:attribute name="name" type="xs:string" use="required" />
+          </xs:complexType>
+        </xs:element>
+      </xs:sequence>
+    </xs:complexType>
+  </xs:element>
+</xs:schema>
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissions.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissions.cs	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/HivePermissions.cs	(revision 2065)
@@ -0,0 +1,206 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.XPath;
+using HeuristicLab.Security.Contracts.BusinessObjects;
+using System.Diagnostics;
+
+namespace HeuristicLab.Hive.Server.Core  {
+  
+  public static class HivePermissions {
+    private const string PERMISSIONFILE = "Authorization//HivePermissionSet.xml";
+    private const string POLICIESFILE = "Authorization//HivePermissionPolicy.xml";
+
+    public static class Jobmanagement {
+      [Flags]
+      public enum Assign {
+        ToAnyResource = 0x02,
+        ToProject = 0x04
+      }
+      [Flags]
+      public enum Abort {
+        /// <summary>Can abort any job.</summary>
+        Any = 0x02,
+        /// <summary>Can abort jobs from specific project only.</summary>
+        ProjectOnly = 0x04,
+        /// <summary>Can abort only owned jobs.</summary>
+        OwnedOnly = 0x08
+      }
+      [Flags]
+      public enum Create {
+        /// <summary>Can create a job everywhere.</summary>
+        Any = 0x02,
+        /// <summary>Can create a job in project context only.</summary>
+        ProjectOnly = 0x04,
+        /// <summary>Can create a job for owned resources only.</summary>
+        OwnedOnly = 0x08
+      }
+      [Flags]
+      public enum Read {
+        /// <summary>Can read any job.</summary>
+        Any = 0x02,
+        /// <summary>Can read a job in project context only.</summary>
+        ProjectOnly = 0x04,
+        /// <summary>Can read only owned job.</summary>
+        OwnedOnly = 0x08
+      }
+      [Flags]
+      public enum Delete {
+        /// <summary>Can delete any job.</summary>
+        Any = 0x02,
+        /// <summary>Can delete a job in project context only.</summary>
+        ProjectOnly = 0x04,
+        /// <summary>Can delete only owned job.</summary>
+        OwnedOnly = 0x08
+      }
+    }
+
+    public static class Usermanagement {
+      [Flags]
+      public enum User {
+        Create = 0x02,
+        Read = 0x04,
+        Update = 0x08,
+        Delete = 0x16
+      }
+
+      [Flags]
+      public enum UserGroup {
+        Create = 0x02,
+        Read = 0x04,
+        Update = 0x08,
+        Delete = 0x16
+      }
+
+      [Flags]
+      public enum Client {
+        Create = 0x02,
+        Read = 0x04,
+        Update = 0x08,
+        Delete = 0x16
+      }
+
+      [Flags]
+      public enum ClientGroup {
+        Create = 0x02,
+        Read = 0x04,
+        Update = 0x08,
+        Delete = 0x16
+      }
+    }
+
+    public static class PermissionManagement {
+      [Flags]
+      public enum Permission {
+        Grant = 0x02,
+        Revoke = 0x04
+      }
+    }
+
+    public static class ResourceManagement {
+      [Flags]
+      public enum Project {
+        Create = 0x02,
+        Read = 0x04,
+        Update = 0x08,
+        Delete = 0x16
+      }
+    }
+
+    private static PermissionCollection pc;
+
+    private static PolicyCollection pol;
+
+    public static PermissionCollection GetPermissions() {
+      if (pc == null) {
+        pc = new PermissionCollection();
+        LoadFromXml(pc.Permissions, PERMISSIONFILE);
+      }
+      return pc;
+    }
+
+    public static PolicyCollection GetPolicies() {
+      if (pol == null) {
+        pol = new PolicyCollection();
+        LoadFromXml(pol.Policies, POLICIESFILE);
+      }
+      return pol;
+    }
+
+    public static string ConvertEnumType(object obj) {
+      string retVal = string.Empty;
+      Type t = obj.GetType();
+      string value = obj.ToString();
+      retVal = (t.FullName.Replace(t.Namespace + ".", "")).Replace("+", ".") + "." + value;
+      return retVal;
+    }
+
+    /// <summary>
+    /// Permission
+    /// </summary>
+    /// <param name="perm"></param>
+    private static void LoadFromXml(IList<Permission> perm, string filename) {
+      Permission p = null;
+      XPathDocument doc;
+      doc = new XPathDocument(filename);
+      XPathNavigator nav = doc.CreateNavigator();
+      nav.MoveToRoot();
+      do {
+        if (nav.NodeType == XPathNodeType.Element && nav.Name == "Permission") {
+          p = new Permission();
+          p.Name = nav.GetAttribute("name", "");
+          nav.MoveToFollowing(XPathNodeType.Element);
+          if (nav.Name == "ID")
+            p.Id = new Guid(nav.Value);
+          nav.MoveToFollowing(XPathNodeType.Element);
+          if (nav.Name == "Description")
+            p.Description = nav.Value;
+          nav.MoveToFollowing(XPathNodeType.Element);
+          if (nav.Name == "Plugin")
+            p.Plugin = nav.Value;
+          perm.Add(p);
+        }
+      } while (nav.MoveToFollowing(XPathNodeType.Element));
+    }
+
+    /// <summary>
+    /// Policy
+    /// </summary>
+    /// <param name="pol"></param>
+    /// <param name="filename"></param>
+    private static void LoadFromXml(IList<Policy> policyList, string filename) {
+      PermissionCollection permissionCollection = GetPermissions();
+      XPathDocument doc = new XPathDocument(filename);
+      XPathNavigator nav = doc.CreateNavigator();
+      nav.MoveToRoot();
+      //receive all policies -> Element <Policy name="xxx">...</Policy>
+      do {
+        if (nav.NodeType == XPathNodeType.Element && nav.Name == "Policy") {
+          string policyName = nav.GetAttribute("name", "");
+          Policy policy = new Policy(policyName);
+          nav.MoveToFollowing(XPathNodeType.Element);
+          //receive all permissions -> Element <Permission.../>
+          do {
+            if (nav.Name == "Permission" && nav.HasAttributes) {
+              PermissionContext ctx = new PermissionContext();
+              int prior = 0;
+              int.TryParse(nav.GetAttribute("priority", ""), out prior);
+              ctx.Priority = prior;
+              ctx.Elevation = nav.GetAttribute("context", "");
+              string permissionName = nav.GetAttribute("name", "");
+              if (!string.IsNullOrEmpty(permissionName)) {
+                Permission permission = permissionCollection[permissionName];
+                Debug.WriteLineIf(permission == null, "Permission '" + permissionName + "' not found in PermissionCollection!");
+                if (permission != null)
+                  policy.AddPermission(permission, ctx);
+              }
+            }
+          } while (nav.MoveToNext());
+          policyList.Add(policy);
+        }
+      } while (nav.MoveToFollowing(XPathNodeType.Element));
+    }
+  }
+  
+}
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/PermissionCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/PermissionCollection.cs	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/PermissionCollection.cs	(revision 2065)
@@ -0,0 +1,56 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Security.Contracts.BusinessObjects;
+
+namespace HeuristicLab.Hive.Server.Core {
+  public class PermissionCollection : IEnumerable<Permission> {
+    public IList<Permission> perm = new List<Permission>();
+
+    public PermissionCollection() {
+    }
+
+    public IList<Permission> Permissions {
+      get { return perm; }
+    }
+
+    /// <summary>
+    /// Gets the Permission identified by FQN type.
+    /// </summary>
+    /// <param name="permissionName">eg. 'HivePermissions.Jobmanagement.Create.Any'</param>
+    /// <returns></returns>
+    public Permission this[string permissionName] {
+      get {
+        foreach (Permission item in perm) {
+          if (item.Name == permissionName)
+            return item;
+        }
+        return null;
+      }
+    }
+
+    /// <summary>
+    /// Converts an enumeration to a fully qualified string.
+    /// </summary>
+    /// <param name="obj">Any enumeration type.</param>
+    /// <returns>Type Information in Full Qualified Notation (FQN).</returns>
+    public string Convert(object obj) {
+      string retVal = string.Empty;
+      Type t = obj.GetType();
+      string value = obj.ToString();
+      retVal = (t.FullName.Replace(t.Namespace + ".", "")).Replace("+", ".") + "." + value;
+      return retVal;
+    }
+
+    public IEnumerator<Permission> GetEnumerator() {
+      return perm.GetEnumerator();
+    }
+
+    System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
+      return perm.GetEnumerator();
+    }
+
+  }
+
+}
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/PermissionContext.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/PermissionContext.cs	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/PermissionContext.cs	(revision 2065)
@@ -0,0 +1,24 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.Hive.Server.Core {
+  /// <summary>
+  /// Holds additional information about a certain permission.
+  /// </summary>
+  public class PermissionContext {
+    private int _priority;
+    /// <summary>
+    /// Gets or sets the priority of this permission rule.
+    /// </summary>
+    public int Priority { get { return this._priority; } set { this._priority = value; } }
+
+    private string _elevation;
+    /// <summary>
+    /// Gets or sets the Rights Elevation Information. (Primary Policy Context)
+    /// </summary>
+    public string Elevation { get { return this._elevation; } set { this._elevation = value; } }
+
+  }
+}
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/PermissionException.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/PermissionException.cs	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/PermissionException.cs	(revision 2065)
@@ -0,0 +1,17 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.ServiceModel;
+
+namespace HeuristicLab.Hive.Server.Core {
+  public class PermissionException : FaultException {
+    public PermissionException()
+      : base("Current user has insufficent rights for this action!") {
+    }
+
+    public PermissionException(string msg)
+      : base("Current user has insufficent rights for this action: " + msg) {
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/Policy.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/Policy.cs	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/Policy.cs	(revision 2065)
@@ -0,0 +1,31 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using HeuristicLab.Security.Contracts.BusinessObjects;
+
+namespace HeuristicLab.Hive.Server.Core {
+  public class Policy {
+    private string _name;
+    public string Name { get { return _name; } set { this._name = value; } }
+
+    private IDictionary<Permission, PermissionContext> _permissions = new Dictionary<Permission, PermissionContext>();
+    public IDictionary<Permission, PermissionContext> Permissions { get { return this._permissions; } set { this._permissions = value; } }
+
+    public Policy(string name) {
+      this._name = name;
+    }
+
+    public void AddPermission(Permission permission, PermissionContext ctx) {
+      this._permissions.Add(permission, ctx);
+    }
+
+    public Permission GetPermissionByContext(string context) {
+      foreach (KeyValuePair<Permission, PermissionContext> item in _permissions) {
+        if (item.Value.Elevation == context)
+          return item.Key;
+      }
+      return null;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/PolicyCollection.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/PolicyCollection.cs	(revision 2065)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/Authorization/PolicyCollection.cs	(revision 2065)
@@ -0,0 +1,30 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.Hive.Server.Core {
+  public class PolicyCollection : IEnumerable<Policy> {
+    private IList<Policy> _policies = new List<Policy>();
+
+    public IList<Policy> Policies { get { return this._policies; } }
+
+    public Policy this[string name] {
+      get {
+        foreach (Policy item in _policies) {
+          if (item.Name == name)
+            return item;
+        }
+        return null;
+      }
+    }
+
+    public IEnumerator<Policy> GetEnumerator() {
+      return this._policies.GetEnumerator();
+    }
+
+    System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
+      return this._policies.GetEnumerator();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/HeuristicLab.Hive.Server.Core-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/HeuristicLab.Hive.Server.Core-3.2.csproj	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/HeuristicLab.Hive.Server.Core-3.2.csproj	(revision 2065)
@@ -85,4 +85,10 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Authorization\HivePermissions.cs" />
+    <Compile Include="Authorization\PermissionCollection.cs" />
+    <Compile Include="Authorization\PermissionContext.cs" />
+    <Compile Include="Authorization\PermissionException.cs" />
+    <Compile Include="Authorization\Policy.cs" />
+    <Compile Include="Authorization\PolicyCollection.cs" />
     <Compile Include="ClientCommunicator.cs" />
     <Compile Include="ClientFacade.cs" />
@@ -90,5 +96,5 @@
     <Compile Include="DbTestApp.cs" />
     <Compile Include="ExecutionEngineFacade.cs" />
-    <Compile Include="HivePermissionManager.cs" />
+    <Compile Include="Authorization\HivePermissionManager.cs" />
     <Compile Include="HiveServerCorePlugin.cs" />
     <Compile Include="HiveServerMessages.Designer.cs" />
@@ -98,5 +104,4 @@
     <Compile Include="JobManager.cs" />
     <Compile Include="LifecycleManager.cs" />
-    <Compile Include="PermissiveSecurityConstants.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="ServerConsoleFacade.cs" />
@@ -112,4 +117,7 @@
     <None Include="app.config" />
     <None Include="HeuristicLab.snk" />
+    <EmbeddedResource Include="Authorization\HivePermissionSet.xsd">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </EmbeddedResource>
     <None Include="Properties\AssemblyInfo.frame" />
     <None Include="Properties\Settings.settings">
@@ -148,4 +156,12 @@
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Authorization\HivePermissionSet.xml">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="Authorization\HivePermissionPolicy.xml" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/InternalInterfaces/IHivePermissionManager.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/InternalInterfaces/IHivePermissionManager.cs	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/InternalInterfaces/IHivePermissionManager.cs	(revision 2065)
@@ -2,4 +2,12 @@
 namespace HeuristicLab.Hive.Server.Core.InternalInterfaces {
   public interface IHivePermissionManager {
+    /// <summary>
+    /// Checks user permission against predefined policy in database.
+    /// </summary>
+    /// <param name="permission">the name of policy defined in xml-file</param>
+    /// <param name="sessionID">the users current session ID</param>
+    /// <param name="entityID"></param>
+    /// <exception cref="PermissionException">thrown when access denied</exception>
+    void Authorize(string policyName, Guid sessionID, Guid entityID);
     bool CheckPermission(Guid sessionID, Guid actionID, Guid entityId);
     Guid Login(string username, string password);
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/PermissiveSecurityConstants.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/PermissiveSecurityConstants.cs	(revision 2064)
+++ 	(revision )
@@ -1,91 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace HeuristicLab.Hive.Server.Core {
-  /// <summary>
-  /// PermissiveSecurityAction contains the GUIDs for 
-  /// </summary>
-  public static class PermissiveSecurityAction {
-    public static Guid Add_Job {
-      get { return new Guid("A477BEA9-9C05-477f-AD9E-F76C510DDB0B"); }
-    }
-
-    public static Guid Get_AllJobs {
-      get { return new Guid("7FC39A7C-1807-4d76-B847-F0DE9DF0275E"); }
-    }
-
-    public static Guid Get_LastJobResult {
-      get { return new Guid("79E8705E-23F5-4157-A3E5-BBE6CE2C6C01"); }
-    }
-
-    public static Guid Get_AllJobResults {
-      get { return new Guid("F72B9338-22A4-4870-B6A3-14BA38DF3BEF"); }
-    }
-
-    public static Guid Remove_Job {
-      get { return new Guid("FFDB7636-4A31-44b7-B843-289B2E8808BD"); }
-    }
-
-    public static Guid Abort_Job {
-      get { return new Guid("DFACD3D6-E85E-42b7-B4AE-0FB33C598F24"); }
-    }
-
-    public static Guid Request_Snapshot {
-      get { return new Guid("40D41BAA-6495-42c6-82B6-9A7CDB1F30EF"); }
-    }
-
-    public static Guid List_AllClients {
-      get { return new Guid("D8EAC687-BE9A-4266-B410-35674A374462"); }
-    }
-
-    public static Guid List_AllClientGroups {
-      get { return new Guid("29FACE0C-A1CA-428b-A757-7FAABD74AFB8"); }
-    }
-
-    public static Guid Show_Statistics {
-      get { return new Guid("FAEFF433-037E-48b7-9CC7-34C560894304"); }
-    }
-
-    public static Guid Add_ClientGroup {
-      get { return new Guid("81984753-7401-4a4b-B819-BC48BC662B0F"); }
-    }
-
-    public static Guid Add_Resource {
-      get { return new Guid("8C76C1F1-31B6-4c66-BCFF-E92EA00CABF5"); }
-    }
-
-    public static Guid Delete_Resource {
-      get { return new Guid("EC2362E0-0781-493f-8688-76F3CDFEF339"); }
-    }
-
-    public static Guid Add_User {
-      get { return new Guid("4FE34091-6674-4c24-BE2E-8AE0DAAAD29C"); }
-    }
-
-    public static Guid Delete_User {
-      get { return new Guid("835CF39C-F830-4130-BBAF-E0100B2760D2"); }
-    }
-
-    public static Guid Update_User {
-      get { return new Guid("FEB4D84B-25CB-4708-8B70-3159F40D8F6E"); }
-    }
-
-    public static Guid Get_User {
-      get { return new Guid("19EF2197-F71A-44ae-9916-3F5AEEC4E463"); }
-    }
-
-    public static Guid Grant_Permission {
-      get { return new Guid("B7696208-1EA3-4675-8834-5659CD6BB5DC"); }
-    }
-
-    public static Guid Revoke_Permission {
-      get { return new Guid("357DE1A5-198E-4b90-BC55-C007D504AF65"); }
-    }
-
-    public static Guid Get_AllGroupsOfResource {
-      get { return new Guid("07436F36-E882-4aed-B787-861E4AADC5E6"); }
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ServerConsoleFacade.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ServerConsoleFacade.cs	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server.Core/3.2/ServerConsoleFacade.cs	(revision 2065)
@@ -29,4 +29,6 @@
 using HeuristicLab.Security.Contracts.Interfaces;
 using HeuristicLab.Hive.Server.Core.InternalInterfaces;
+using System.ServiceModel;
+
 
 namespace HeuristicLab.Hive.Server.Core {
@@ -45,5 +47,4 @@
       Response resp = new Response();
      
-      /*
       sessionID = secMan.Login(username, password);
       if (sessionID == Guid.Empty) {
@@ -55,8 +56,4 @@
           ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_SUCCESS;
       }
-      */ 
-      sessionID = Guid.Empty;
-      resp.Success = true;
-      resp.StatusMessage = ApplicationConstants.RESPONSE_SERVERCONSOLE_LOGIN_SUCCESS;
       return resp;
     }
@@ -64,154 +61,104 @@
 
     public ResponseList<ClientInfo> GetAllClients() {
-      if (HasPermission(PermissiveSecurityAction.List_AllClients))
-        return clientManager.GetAllClients();
-      else
-        throw new PermissionException();
+      secMan.Authorize("AccessClients", sessionID, Guid.Empty);
+      return clientManager.GetAllClients();
     }
 
     public ResponseList<ClientGroup> GetAllClientGroups() {
-      if (HasPermission(PermissiveSecurityAction.List_AllClientGroups))
-        return clientManager.GetAllClientGroups();
-      else
-        throw new PermissionException();
+      secMan.Authorize("AccessClientGroup", sessionID, Guid.Empty);
+      return clientManager.GetAllClientGroups();
     }
 
     public ResponseList<UpTimeStatistics> GetAllUpTimeStatistics() {
-      if (HasPermission(PermissiveSecurityAction.Show_Statistics))
-        return clientManager.GetAllUpTimeStatistics();
-      else
-        throw new PermissionException();
+      secMan.Authorize("AccessStatistics", sessionID, Guid.Empty);
+      return clientManager.GetAllUpTimeStatistics();
     }
 
     public ResponseObject<ClientGroup> AddClientGroup(ClientGroup clientGroup) {
-      if (HasPermission(PermissiveSecurityAction.Add_ClientGroup))
-        return clientManager.AddClientGroup(clientGroup);
-      else
-        throw new PermissionException();
+      secMan.Authorize("AddClientGroup", sessionID, Guid.Empty);
+      return clientManager.AddClientGroup(clientGroup);
     }
 
     public Response AddResourceToGroup(Guid clientGroupId, Resource resource) {
-      if (HasPermission(PermissiveSecurityAction.Add_Resource))
-        return clientManager.AddResourceToGroup(clientGroupId, resource);
-      else
-        throw new PermissionException();
+      secMan.Authorize("AddResource", sessionID, Guid.Empty);                
+      return clientManager.AddResourceToGroup(clientGroupId, resource);
     }
 
     public Response DeleteResourceFromGroup(Guid clientGroupId, Guid resourceId) {
-      if (HasPermission(PermissiveSecurityAction.Delete_Resource))
         return clientManager.DeleteResourceFromGroup(clientGroupId, resourceId);
-      else
-        throw new PermissionException();
     }
 
-
-    public ResponseList<HeuristicLab.Hive.Contracts.BusinessObjects.Job> GetAllJobs() {
-      if (HasPermission(PermissiveSecurityAction.Get_AllJobs))
-        return jobManager.GetAllJobs();
-      else
-        throw new PermissionException();
+    public ResponseList<Job> GetAllJobs() {
+      secMan.Authorize("AccessJobs", sessionID, Guid.Empty);
+      return jobManager.GetAllJobs();
     }
 
-    public ResponseObject<HeuristicLab.Hive.Contracts.BusinessObjects.Job> GetJobById(Guid jobId) {
+    public ResponseObject<Job> GetJobById(Guid jobId) {
+      secMan.Authorize("AccessJobs", sessionID, jobId);
       return jobManager.GetJobById(jobId);
     }
 
     public ResponseObject<Job> AddNewJob(Job job) {
-      if (HasPermission(PermissiveSecurityAction.Add_Job))
-        return jobManager.AddNewJob(job);
-      else
-        throw new PermissionException();
+      secMan.Authorize("AddJob", sessionID, job.Id);
+      return jobManager.AddNewJob(job);
     }
 
     public ResponseObject<JobResult> GetLastJobResultOf(Guid jobId, bool requested) {
-      if (HasPermission(PermissiveSecurityAction.Get_LastJobResult))
-        return jobManager.GetLastJobResultOf(jobId, requested);
-      else
-        throw new PermissionException();
+      secMan.Authorize("AccessJobResults", sessionID, jobId);
+      return jobManager.GetLastJobResultOf(jobId, requested);
     }
 
     public ResponseList<JobResult> GetAllJobResults(Guid jobId) {
-      if (HasPermission(PermissiveSecurityAction.Get_AllJobResults))
-        return jobManager.GetAllJobResults(jobId);
-      else
-        throw new PermissionException();
+      secMan.Authorize("AccessJobResults", sessionID, jobId);  
+      return jobManager.GetAllJobResults(jobId);
     }
 
     public Response RemoveJob(Guid jobId) {
-      if (HasPermission(PermissiveSecurityAction.Remove_Job))
-        return jobManager.RemoveJob(jobId);
-      else
-        throw new PermissionException();
+      secMan.Authorize("RemoveJob", sessionID, jobId);
+      return jobManager.RemoveJob(jobId);
     }
 
     public Response RequestSnapshot(Guid jobId) {
-      if (HasPermission(PermissiveSecurityAction.Request_Snapshot))
-        return jobManager.RequestSnapshot(jobId);
-      else
-        throw new PermissionException();
+      secMan.Authorize("AccessJobResults", sessionID, jobId);  
+      return jobManager.RequestSnapshot(jobId);
     }
 
     public Response AbortJob(Guid jobId) {
-      if (HasPermission(PermissiveSecurityAction.Abort_Job))
-        return jobManager.AbortJob(jobId);
-      else
-        throw new PermissionException();
+      secMan.Authorize("AbortJob", sessionID, Guid.Empty);
+      return jobManager.AbortJob(jobId);
     }
 
     public ResponseObject<List<ClientGroup>> GetAllGroupsOfResource(Guid resourceId) {
-      if (HasPermission(PermissiveSecurityAction.Get_AllGroupsOfResource))
-        return clientManager.GetAllGroupsOfResource(resourceId);
-      else
-        throw new PermissionException();      
+      secMan.Authorize("AccessUserGroup", sessionID, Guid.Empty);
+      return clientManager.GetAllGroupsOfResource(resourceId);
     }
 
     public Response DeleteClientGroup(Guid clientGroupId) {
+      secMan.Authorize("DeleteClientGroup", sessionID, Guid.Empty);
       return clientManager.DeleteClientGroup(clientGroupId);
     }
 
-  /*
-    private bool HasPermission(Guid action) {
-      return (sessionID == Guid.Empty) ? false : secMan.CheckPermission(sessionID, action, Guid.Empty);
-    }
-
-    private bool HasPermission(Guid action, Guid entityId) {
-      return (sessionID == Guid.Empty) ? false : secMan.CheckPermission(sessionID, action, entityId);
-    }
-   */
-
-    [Obsolete("Only for testing!")]
-    private bool HasPermission(Guid g) { return true; }
-    [Obsolete("Only for testing!")]
-    private bool HasPermission(Guid g, Guid f) { return true; }
-
-    public class PermissionException : Exception {
-      public PermissionException()
-        : base("Current user has insufficent rights for this action!") {
-      }
-
-      public PermissionException(string msg)
-        : base(msg) {
-      }
-
-
-    }
-
     public ResponseList<Project> GetAllProjects() {
+      secMan.Authorize("AccessProjects", sessionID, Guid.Empty);
       return jobManager.GetAllProjects();
     }
 
     public Response CreateProject(Project project) {
+      secMan.Authorize("CreateProjects", sessionID, Guid.Empty);
       return jobManager.CreateProject(project);
     }
 
     public Response ChangeProject(Project project) {
+      secMan.Authorize("ChangeProjects", sessionID, Guid.Empty);
       return jobManager.ChangeProject(project);
     }
 
     public Response DeleteProject(Guid projectId) {
+      secMan.Authorize("DeleteProjects", sessionID, projectId);
       return jobManager.DeleteProject(projectId);
     }
 
     public ResponseList<Job> GetJobsByProject(Guid projectId) {
+      secMan.Authorize("AccessJobs", sessionID, Guid.Empty);
       return jobManager.GetJobsByProject(projectId);
     }
Index: trunk/sources/HeuristicLab.Hive.Server/3.2/HeuristicLab.Hive.Server-3.2.csproj
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server/3.2/HeuristicLab.Hive.Server-3.2.csproj	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server/3.2/HeuristicLab.Hive.Server-3.2.csproj	(revision 2065)
@@ -112,4 +112,5 @@
       <AutoGen>True</AutoGen>
       <DependentUpon>Resources.resx</DependentUpon>
+      <DesignTime>True</DesignTime>
     </Compile>
     <None Include="Properties\AssemblyInfo.frame" />
@@ -139,4 +140,7 @@
     </ProjectReference>
   </ItemGroup>
+  <ItemGroup>
+    <None Include="Resources\HeuristicLab.ico" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
Index: trunk/sources/HeuristicLab.Hive.Server/3.2/HiveServerApplication.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server/3.2/HiveServerApplication.cs	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server/3.2/HiveServerApplication.cs	(revision 2065)
@@ -30,4 +30,5 @@
 using HeuristicLab.Hive.Contracts;
 using HeuristicLab.Hive.Contracts.Interfaces;
+using HeuristicLab.Hive.Server.Properties;
 
 namespace HeuristicLab.Hive.Server {
@@ -158,9 +159,7 @@
 
         lifecycleManager.Init();
-
         Form mainForm = new MainForm(baseAddrDict);
-
         Application.Run(mainForm);
-
+        
         lifecycleManager.Shutdown();
       }
Index: trunk/sources/HeuristicLab.Hive.Server/3.2/MainForm.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server/3.2/MainForm.Designer.cs	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server/3.2/MainForm.Designer.cs	(revision 2065)
@@ -29,10 +29,14 @@
         private void InitializeComponent()
         {
+          this.components = new System.ComponentModel.Container();
           this.label1 = new System.Windows.Forms.Label();
-          this.lblAddress1 = new System.Windows.Forms.Label();
-          this.label2 = new System.Windows.Forms.Label();
-          this.lblAddress2 = new System.Windows.Forms.Label();
-          this.label3 = new System.Windows.Forms.Label();
-          this.lblAddress3 = new System.Windows.Forms.Label();
+          this.rtfServices = new System.Windows.Forms.RichTextBox();
+          this.ni = new System.Windows.Forms.NotifyIcon(this.components);
+          this.ctxNotifyMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
+          this.tsShowInfo = new System.Windows.Forms.ToolStripMenuItem();
+          this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+          this.tsExit = new System.Windows.Forms.ToolStripMenuItem();
+          this.btnClose = new System.Windows.Forms.Button();
+          this.ctxNotifyMenu.SuspendLayout();
           this.SuspendLayout();
           // 
@@ -40,68 +44,81 @@
           // 
           this.label1.AutoSize = true;
-          this.label1.Location = new System.Drawing.Point(18, 18);
+          this.label1.Location = new System.Drawing.Point(12, 9);
           this.label1.Name = "label1";
-          this.label1.Size = new System.Drawing.Size(183, 13);
+          this.label1.Size = new System.Drawing.Size(97, 13);
           this.label1.TabIndex = 0;
-          this.label1.Text = "Hive Server Client Facade running @";
+          this.label1.Text = "Available Services:";
           // 
-          // lblAddress1
+          // rtfServices
           // 
-          this.lblAddress1.AutoSize = true;
-          this.lblAddress1.Location = new System.Drawing.Point(18, 43);
-          this.lblAddress1.Name = "lblAddress1";
-          this.lblAddress1.Size = new System.Drawing.Size(44, 13);
-          this.lblAddress1.TabIndex = 1;
-          this.lblAddress1.Text = "address";
+          this.rtfServices.Location = new System.Drawing.Point(12, 25);
+          this.rtfServices.Name = "rtfServices";
+          this.rtfServices.ReadOnly = true;
+          this.rtfServices.Size = new System.Drawing.Size(280, 121);
+          this.rtfServices.TabIndex = 1;
+          this.rtfServices.Text = "";
           // 
-          // label2
+          // ni
           // 
-          this.label2.AutoSize = true;
-          this.label2.Location = new System.Drawing.Point(18, 76);
-          this.label2.Name = "label2";
-          this.label2.Size = new System.Drawing.Size(195, 13);
-          this.label2.TabIndex = 2;
-          this.label2.Text = "Hive Server Console Facade running @";
+          this.ni.ContextMenuStrip = this.ctxNotifyMenu;
+          this.ni.Text = "notifyIcon1";
+          this.ni.Visible = true;
           // 
-          // lblAddress2
+          // ctxNotifyMenu
           // 
-          this.lblAddress2.AutoSize = true;
-          this.lblAddress2.Location = new System.Drawing.Point(18, 102);
-          this.lblAddress2.Name = "lblAddress2";
-          this.lblAddress2.Size = new System.Drawing.Size(44, 13);
-          this.lblAddress2.TabIndex = 3;
-          this.lblAddress2.Text = "address";
+          this.ctxNotifyMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+            this.tsShowInfo,
+            this.toolStripSeparator1,
+            this.tsExit});
+          this.ctxNotifyMenu.Name = "ctxNotifyMenu";
+          this.ctxNotifyMenu.Size = new System.Drawing.Size(106, 54);
           // 
-          // label3
+          // tsShowInfo
           // 
-          this.label3.AutoSize = true;
-          this.label3.Location = new System.Drawing.Point(18, 131);
-          this.label3.Name = "label3";
-          this.label3.Size = new System.Drawing.Size(206, 13);
-          this.label3.TabIndex = 4;
-          this.label3.Text = "Hive Execution Engine Facade running @";
+          this.tsShowInfo.Name = "tsShowInfo";
+          this.tsShowInfo.Size = new System.Drawing.Size(105, 22);
+          this.tsShowInfo.Text = "&Info";
+          this.tsShowInfo.Click += new System.EventHandler(this.ShowInfo);
           // 
-          // lblAddress3
+          // toolStripSeparator1
           // 
-          this.lblAddress3.AutoSize = true;
-          this.lblAddress3.Location = new System.Drawing.Point(18, 159);
-          this.lblAddress3.Name = "lblAddress3";
-          this.lblAddress3.Size = new System.Drawing.Size(44, 13);
-          this.lblAddress3.TabIndex = 5;
-          this.lblAddress3.Text = "address";
+          this.toolStripSeparator1.Name = "toolStripSeparator1";
+          this.toolStripSeparator1.Size = new System.Drawing.Size(102, 6);
+          // 
+          // tsExit
+          // 
+          this.tsExit.Name = "tsExit";
+          this.tsExit.Size = new System.Drawing.Size(105, 22);
+          this.tsExit.Text = "E&xit";
+          this.tsExit.Click += new System.EventHandler(this.CloseApp);
+          // 
+          // btnClose
+          // 
+          this.btnClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+          this.btnClose.Location = new System.Drawing.Point(279, 1);
+          this.btnClose.Name = "btnClose";
+          this.btnClose.Size = new System.Drawing.Size(22, 21);
+          this.btnClose.TabIndex = 2;
+          this.btnClose.Text = "X";
+          this.btnClose.UseVisualStyleBackColor = true;
+          this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
           // 
           // MainForm
           // 
+          this.AcceptButton = this.btnClose;
           this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
           this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-          this.ClientSize = new System.Drawing.Size(304, 181);
-          this.Controls.Add(this.lblAddress3);
-          this.Controls.Add(this.label3);
-          this.Controls.Add(this.lblAddress2);
-          this.Controls.Add(this.label2);
-          this.Controls.Add(this.lblAddress1);
+          this.CancelButton = this.btnClose;
+          this.ClientSize = new System.Drawing.Size(304, 166);
+          this.ControlBox = false;
+          this.Controls.Add(this.btnClose);
+          this.Controls.Add(this.rtfServices);
           this.Controls.Add(this.label1);
+          this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
           this.Name = "MainForm";
+          this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
           this.Text = "Hive Server";
+          this.TopMost = true;
+          this.ctxNotifyMenu.ResumeLayout(false);
           this.ResumeLayout(false);
           this.PerformLayout();
@@ -112,9 +129,11 @@
 
         private System.Windows.Forms.Label label1;
-        private System.Windows.Forms.Label lblAddress1;
-        private System.Windows.Forms.Label label2;
-        private System.Windows.Forms.Label lblAddress2;
-        private System.Windows.Forms.Label label3;
-        private System.Windows.Forms.Label lblAddress3;
+        private System.Windows.Forms.RichTextBox rtfServices;
+        private System.Windows.Forms.NotifyIcon ni;
+        private System.Windows.Forms.ContextMenuStrip ctxNotifyMenu;
+        private System.Windows.Forms.ToolStripMenuItem tsShowInfo;
+        private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
+        private System.Windows.Forms.ToolStripMenuItem tsExit;
+        private System.Windows.Forms.Button btnClose;
     }
 }
Index: trunk/sources/HeuristicLab.Hive.Server/3.2/MainForm.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server/3.2/MainForm.cs	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server/3.2/MainForm.cs	(revision 2065)
@@ -7,4 +7,5 @@
 using System.Text;
 using System.Windows.Forms;
+using HeuristicLab.Hive.Server.Properties;
 
 namespace HeuristicLab.Hive.Server
@@ -13,14 +14,38 @@
         public MainForm(Dictionary<string, Uri> addresses) {
           InitializeComponent();
+          this.Visible = false;
+
           Uri uri;
+          StringBuilder servicesTxt = new StringBuilder();
           addresses.TryGetValue(HiveServerApplication.STR_ClientCommunicator, out uri);
-          if(uri!=null)
-            this.lblAddress1.Text = uri.ToString();
+          if (uri != null)
+            servicesTxt.AppendLine(String.Format("Server Client: {0}", uri));
           addresses.TryGetValue(HiveServerApplication.STR_ServerConsoleFacade, out uri);
           if (uri != null)
-            this.lblAddress2.Text = uri.ToString();
+            servicesTxt.AppendLine(String.Format("Server Console: {0}", uri));
           addresses.TryGetValue(HiveServerApplication.STR_ExecutionEngineFacade, out uri);
           if (uri != null)
-            this.lblAddress3.Text = uri.ToString();
+            servicesTxt.AppendLine(String.Format("Execution Engine: {0}", uri));
+
+          rtfServices.AppendText(servicesTxt.ToString());
+
+          ni.Icon = Resources.HeuristicLab;
+          ni.BalloonTipTitle = "HL Hive Server Services";
+          ni.BalloonTipText = servicesTxt.ToString();
+          ni.BalloonTipIcon = ToolTipIcon.Info;
+          ni.Text = "HL Hive Server Services";
+          ni.ShowBalloonTip(10000);
+        }
+
+        private void CloseApp(object sender, EventArgs e) {
+          Dispose();
+        }
+
+        private void ShowInfo(object sender, EventArgs e) {
+          this.Visible = true;
+        }
+
+        private void btnClose_Click(object sender, EventArgs e) {
+          this.Visible = false;
         }
 
Index: trunk/sources/HeuristicLab.Hive.Server/3.2/MainForm.resx
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server/3.2/MainForm.resx	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server/3.2/MainForm.resx	(revision 2065)
@@ -118,3 +118,9 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <metadata name="ni.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="ctxNotifyMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>77, 17</value>
+  </metadata>
 </root>
Index: trunk/sources/HeuristicLab.Hive.Server/3.2/Properties/Resources.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server/3.2/Properties/Resources.Designer.cs	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server/3.2/Properties/Resources.Designer.cs	(revision 2065)
@@ -2,5 +2,5 @@
 // <auto-generated>
 //     This code was generated by a tool.
-//     Runtime Version:2.0.50727.3053
+//     Runtime Version:2.0.50727.3082
 //
 //     Changes to this file may cause incorrect behavior and will be lost if
@@ -9,8 +9,8 @@
 //------------------------------------------------------------------------------
 
-namespace HeuristicLab.Hive.Server.Properties
-{
-
-
+namespace HeuristicLab.Hive.Server.Properties {
+    using System;
+    
+    
     /// <summary>
     ///   A strongly-typed resource class, for looking up localized strings, etc.
@@ -23,26 +23,21 @@
     [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources
-    {
-
+    internal class Resources {
+        
         private static global::System.Resources.ResourceManager resourceMan;
-
+        
         private static global::System.Globalization.CultureInfo resourceCulture;
-
+        
         [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources()
-        {
+        internal Resources() {
         }
-
+        
         /// <summary>
         ///   Returns the cached ResourceManager instance used by this class.
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager
-        {
-            get
-            {
-                if ((resourceMan == null))
-                {
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
                     global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Hive.Server.Properties.Resources", typeof(Resources).Assembly);
                     resourceMan = temp;
@@ -51,5 +46,5 @@
             }
         }
-
+        
         /// <summary>
         ///   Overrides the current thread's CurrentUICulture property for all
@@ -57,13 +52,17 @@
         /// </summary>
         [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture
-        {
-            get
-            {
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
                 return resourceCulture;
             }
-            set
-            {
+            set {
                 resourceCulture = value;
+            }
+        }
+        
+        internal static System.Drawing.Icon HeuristicLab {
+            get {
+                object obj = ResourceManager.GetObject("HeuristicLab", resourceCulture);
+                return ((System.Drawing.Icon)(obj));
             }
         }
Index: trunk/sources/HeuristicLab.Hive.Server/3.2/Properties/Resources.resx
===================================================================
--- trunk/sources/HeuristicLab.Hive.Server/3.2/Properties/Resources.resx	(revision 2064)
+++ trunk/sources/HeuristicLab.Hive.Server/3.2/Properties/Resources.resx	(revision 2065)
@@ -47,5 +47,5 @@
     mimetype: application/x-microsoft.net.object.binary.base64
     value   : The object must be serialized with 
-            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
             : and then encoded with base64 encoding.
     
@@ -61,4 +61,5 @@
     -->
   <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
     <xsd:element name="root" msdata:IsDataSet="true">
       <xsd:complexType>
@@ -69,7 +70,8 @@
                 <xsd:element name="value" type="xsd:string" minOccurs="0" />
               </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="name" use="required" type="xsd:string" />
               <xsd:attribute name="type" type="xsd:string" />
               <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
             </xsd:complexType>
           </xsd:element>
@@ -86,7 +88,8 @@
                 <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
               </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
               <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
               <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
             </xsd:complexType>
           </xsd:element>
@@ -115,3 +118,7 @@
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="HeuristicLab" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\HeuristicLab.ico;System.Drawing.Icon, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>
Index: trunk/sources/HeuristicLab.Security.Core/3.2/SecurityCoreTest.cs
===================================================================
--- trunk/sources/HeuristicLab.Security.Core/3.2/SecurityCoreTest.cs	(revision 2064)
+++ trunk/sources/HeuristicLab.Security.Core/3.2/SecurityCoreTest.cs	(revision 2065)
@@ -6,9 +6,10 @@
 using HeuristicLab.Security.Contracts.BusinessObjects;
 using HeuristicLab.Hive.Server.Core;
+using System.Diagnostics;
 
 namespace HeuristicLab.Security.Core {
     [ClassInfo(Name = "Security Test App",
         Description = "Test Application for the Security Service",
-        AutoRestart = true)]
+        AutoRestart = false)]
   class SecurityCoreTest : ApplicationBase {
 
@@ -166,74 +167,151 @@
         manager.RemovePermission(permission.Id);
       }
-      #region TEST DATA INSERT SECTION for MB
-
-      private void InsertTestDataForPermissionCheck() {
-        int numberOfUsers = 10;
-
-        List<User> users = new List<User>();
-        for (int i = 0; i < numberOfUsers; i++) {
-          users.Add(MB_InsertTestUser());
-        }
-        MB_AssignGroups(users);
-        
-      }
-
-      private User MB_InsertTestUser() {
-        Random rand = new Random(DateTime.Now.Millisecond);
-        int usr = rand.Next(1000);
-        User user = new User();
-        user.Login = "test" + usr.ToString();
-        user.SetHashedPassword("test");
-        user.Name = "test" + usr.ToString();
-        return manager.AddNewUser(user);
-      }
-
-      /// <summary>
-      /// Splits the given users into two groups and assigns them. Some will be not assigned.
-      /// </summary>
-      /// <param name="users"></param>
-      private void MB_AssignGroups(List<User> users) {
-        UserGroup group01 = new UserGroup();
-        group01.Name = "Test Group 01";
-
-        UserGroup group02 = new UserGroup();
-        group02.Name = "Test Group 02";
-
-        //three-way split users into group1, group2 and none
-        int idx = users.Count / 3;
-        for (int i = 0; i < idx; i++) {
-          group01.Members.Add(users[i]);
-        }
-        for (int i = idx; i < users.Count / 2; i++) {
-          group02.Members.Add(users[i]);
-        }
-        manager.AddNewUserGroup(group01);
-        manager.AddNewUserGroup(group02);
-        
-      }
-
-      private void MB_AddPermission(List<User> users) {
-        if (users.Count < 2) return;
-        /*
-        Permission permission = new Permission();
-        //permission.Id = PermissiveSecurityAction.Add_Job;
-        permission.Name = "ADD_JOB";
-        permission.Description = "Add new jobs";
-        permission.Plugin = "HeuristicLab.Hive.Server";
-        manager.AddPermission(permission);
-        */
-        //grant permission to random users
-        Random rand = new Random(DateTime.Now.Millisecond);
-        for (int i = 0; i < users.Count/2; i++) {
-          int idx = rand.Next(users.Count);
-          //manager.GrantPermission(users[i].Id, permission.Id, Guid.Empty);
-          manager.GrantPermission(users[i].Id, PermissiveSecurityAction.Add_Job, Guid.Empty);
-        }
-      }
-
-      #endregion
+ 
+
+      public void InsertClientUser() {
+        PermissionCollection pc = HivePermissions.GetPermissions();
+        Debug.WriteLine("Revoke permissions....");
+        try {
+          UserGroup group = manager.GetUserGroupByName("Projektmitglieder");
+          manager.RevokePermission(group.Id, pc[pc.Convert(HivePermissions.Usermanagement.Client.Read)].Id, Guid.Empty);
+          manager.RevokePermission(group.Id, pc[pc.Convert(HivePermissions.Usermanagement.ClientGroup.Read)].Id, Guid.Empty);
+        }
+        catch (Exception ex) {
+          Debug.WriteLine(ex.Message);
+        }
+        Debug.WriteLine("Remove user...");
+        try {
+          manager.RemoveUser(manager.GetUserByName("HIVE User").Id);
+        }
+        catch (Exception ex) {
+          Debug.WriteLine(ex.Message);
+        }
+        Debug.WriteLine("Remove group....");
+        try {
+          manager.RemoveUserGroup(manager.GetUserGroupByName("Projektmitglieder").Id);
+        }
+        catch (Exception ex) {
+          Debug.WriteLine(ex.Message);
+        }
+
+        User user = new User();
+        user.Login = "hive";
+        user.SetHashedPassword("hive");
+        user.Name = "HIVE User";
+        Debug.WriteLine("Adding user...");
+        try {
+          user = manager.AddNewUser(user);
+        }
+        catch (Exception ex) {
+          Debug.WriteLine(ex.Message);
+        }
+
+        UserGroup grp = new UserGroup();
+        grp.Name = "Projektmitglieder";
+        grp.Members.Add(user);
+        Debug.WriteLine("Adding group...");
+        try {
+          manager.AddNewUserGroup(grp);
+        }
+        catch (Exception ex) {
+          Debug.WriteLine(ex.Message);
+        }
+        Debug.WriteLine("Grant permissions...");
+        try {
+          manager.GrantPermission(grp.Id, pc[pc.Convert(HivePermissions.Usermanagement.Client.Read)].Id, Guid.Empty);
+          manager.GrantPermission(grp.Id, pc[pc.Convert(HivePermissions.Usermanagement.ClientGroup.Read)].Id, Guid.Empty);
+        }
+        catch (Exception ex) {
+          Debug.WriteLine(ex.Message);
+        }
+      }
+
+      public void InsertSuperUser() {
+        Debug.WriteLine("Revoke permissions...");
+        try {
+          UserGroup group = manager.GetUserGroupByName("Administratoren");
+          foreach (Permission item in HivePermissions.GetPermissions()) {
+            manager.RevokePermission(group.Id, item.Id, Guid.Empty);
+          }
+        }
+        catch (Exception ex) {
+          Debug.WriteLine(ex.Message);
+        }
+        Debug.WriteLine("Revoke permissions from admin...");
+        try {
+          Guid g = manager.GetUserByName("HIVE Admin").Id;
+          foreach (Permission item in HivePermissions.GetPermissions()) {
+            manager.RevokePermission(g, item.Id, Guid.Empty);
+          }
+        }
+        catch (Exception ex) {
+          Debug.WriteLine(ex.Message);
+        }
+        Debug.WriteLine("Removing user...");
+        try {
+          manager.RemoveUser(manager.GetUserByName("HIVE Admin").Id);
+        }
+        catch (Exception ex) {
+          Debug.WriteLine(ex.Message);
+        }
+        Debug.WriteLine("Removing group...");
+        try {
+          manager.RemoveUserGroup(manager.GetUserGroupByName("Administratoren").Id);
+        }
+        catch (Exception ex) {
+          Debug.WriteLine(ex.Message);
+        }
+
+        User user = new User();
+        user.Login = "admin";
+        user.SetHashedPassword("admin");
+        user.Name = "HIVE Admin";
+        Debug.WriteLine("Grant ALL permissions to admin...");
+        foreach (Permission item in HivePermissions.GetPermissions()) {
+          manager.GrantPermission(user.Id, item.Id, Guid.Empty);
+        }
+        Debug.WriteLine("Adding user...");
+        try {
+          user = manager.AddNewUser(user);
+        }
+        catch (Exception ex) {
+          Debug.WriteLine(ex.Message);
+        }
+
+        UserGroup grp = new UserGroup();
+        grp.Name = "Administratoren";
+        grp.Members.Add(user);
+        Debug.WriteLine("Adding group...");
+        try {
+          manager.AddNewUserGroup(grp);
+        }
+        catch (Exception ex) {
+          Debug.WriteLine(ex.Message);
+        }
+        Debug.WriteLine("Adding permissions...");
+        //admins allowed to do everything ;)
+        foreach (Permission item in HivePermissions.GetPermissions()) {
+          manager.GrantPermission(grp.Id, item.Id, Guid.Empty);
+        }
+      }
+
+      public void InsertHivePermissions() {
+        foreach (Permission item in HivePermissions.GetPermissions()) {
+          try {
+            manager.AddPermission(item);
+          }
+          catch (Exception ex) {
+            Debug.WriteLine(ex.Message);
+          }
+        }
+      }
+
       public override void Run() {
         //testPermissionsGroup();
-        InsertTestDataForPermissionCheck();
+        
+        InsertHivePermissions();
+        InsertClientUser();
+        InsertSuperUser();
+        Debug.WriteLine("Complete!");
       }
     }
