Skip to Content.
Sympa Menu

idok-commit - [idok-commit] idok commit r154 - trunk/java/ch/idok/qtgui

idok-commit AT lists.psi.ch

Subject: Commit emails of the iDok project

List archive

[idok-commit] idok commit r154 - trunk/java/ch/idok/qtgui


Chronological Thread 
  • From: "Apache" <apache AT savannah.psi.ch>
  • To: idok-commit AT lists.psi.ch
  • Subject: [idok-commit] idok commit r154 - trunk/java/ch/idok/qtgui
  • Date: Wed, 30 Jul 2008 10:48:08 +0200
  • List-archive: <https://lists.web.psi.ch/pipermail/idok-commit/>
  • List-id: Commit emails of the iDok project <idok-commit.lists.psi.ch>

Author: huebner AT PSI.CH
Date: Wed Jul 30 10:48:07 2008
New Revision: 154

Log:
Added improvement IDO-152: The "Permission denied" error message box is not
very user friendly

Also: Fixed a related bug, reducing the number of "Permission denied"
messages.

Modified:
trunk/java/ch/idok/qtgui/AuthorizationController.java
trunk/java/ch/idok/qtgui/FolderTree.java
trunk/java/ch/idok/qtgui/Ldap.java

Modified: trunk/java/ch/idok/qtgui/AuthorizationController.java
==============================================================================
--- trunk/java/ch/idok/qtgui/AuthorizationController.java (original)
+++ trunk/java/ch/idok/qtgui/AuthorizationController.java Wed Jul 30
10:48:07 2008
@@ -334,6 +334,7 @@
DmsCredentials cred = handler.getCredentials();
if (cred.getPassword() != null) {
krb5cred_.setPassword(cred.getPassword());
+ krb5cred_.setUsername(cred.getUsername());
}
if (krb5cred_.getPassword() == null){
QDialog d = new QDialog();
@@ -780,7 +781,7 @@
} catch (DmsException e) {
QMessageBox.warning(null, tr("iDok Warning"), String.format(
tr("Unable to retrieve group members \n %1$s"), e
- .getLogMessage()));
+ .getUserMessage()));
asd_.raise();
}
}

Modified: trunk/java/ch/idok/qtgui/FolderTree.java
==============================================================================
--- trunk/java/ch/idok/qtgui/FolderTree.java (original)
+++ trunk/java/ch/idok/qtgui/FolderTree.java Wed Jul 30 10:48:07 2008
@@ -323,7 +323,7 @@
String
.format(
tr("Unable to get
information from the specified repository:%1$s \n Please try again"),
- e.getLogMessage()));
+ e.getUserMessage()));

}
} finally {

Modified: trunk/java/ch/idok/qtgui/Ldap.java
==============================================================================
--- trunk/java/ch/idok/qtgui/Ldap.java (original)
+++ trunk/java/ch/idok/qtgui/Ldap.java Wed Jul 30 10:48:07 2008
@@ -23,6 +23,7 @@

import com.trolltech.qt.gui.QDialog;
import com.trolltech.qt.gui.QLineEdit;
+import com.trolltech.qt.gui.QMessageBox;
import com.trolltech.qt.gui.QPixmap;

import sun.security.krb5.KrbCred;
@@ -37,6 +38,7 @@
public static String ADS_GROUP_TYPE_SECURITY_GROUP = "-2147483646";
public static String ADS_GROUP_TYPE_DISTRIBUTIONLIST_GROUP =
"-2147483640";
private static Krb5DmsCredentials krb5cred;
+ private static boolean firstAccessError = true;

public Ldap(Krb5DmsCredentials k){
krb5cred = k;
@@ -123,10 +125,13 @@

// Close the context when we're done
ctx.close();
- } catch (NamingException e) {
- System.out.println("List failed: " + e);
- e.printStackTrace();
- }
+ }catch (NamingException e) {
+ if(firstAccessError){
+ QMessageBox.warning(null, "iDok Warning",
+ "Unable to retrieve list from LDAP: \n" + "You dont
have sufficient rights for this operation.");
+ firstAccessError = false;
+ }
+ }
return list;
}




  • [idok-commit] idok commit r154 - trunk/java/ch/idok/qtgui, Apache, 07/30/2008

Archive powered by MHonArc 2.6.19.

Top of Page