Revision: 14482
          http://gate.svn.sourceforge.net/gate/?rev=14482&view=rev
Author:   valyt
Date:     2011-11-02 10:41:04 +0000 (Wed, 02 Nov 2011)
Log Message:
-----------
Compare the actual numeric value of Long objects (rather than their addresses).

Modified Paths:
--------------
    gate/trunk/src/gate/security/UserImpl.java

Modified: gate/trunk/src/gate/security/UserImpl.java
===================================================================
--- gate/trunk/src/gate/security/UserImpl.java  2011-11-02 10:37:26 UTC (rev 
14481)
+++ gate/trunk/src/gate/security/UserImpl.java  2011-11-02 10:41:04 UTC (rev 
14482)
@@ -143,7 +143,7 @@
     }
 
     //1.5 check if user has right to change name
-    if (s.getID() != this.id && false == s.isPrivilegedSession()) {
+    if (s.getID().longValue() != this.id.longValue() && false == 
s.isPrivilegedSession()) {
       throw new SecurityException("insufficient privileges");
     }
 
@@ -215,7 +215,7 @@
     }
 
     //2. check privileges
-    if (false == s.isPrivilegedSession() && s.getID() != this.id) {
+    if (false == s.isPrivilegedSession() && s.getID().longValue() != 
this.id.longValue()) {
       throw new SecurityException("insuffieicent privileges");
     }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
RSA® Conference 2012
Save $700 by Nov 18
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
GATE-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to