Package de.mhus.lib.adb

Examples of de.mhus.lib.adb.AccessDeniedException


          Finances f = (Finances) object;

          String conf = f.getConfidential();
          if (conf != null) {
            if (right == DbManager.R_UPDATE && conf.indexOf("write") >= 0 )
              throw new AccessDeniedException("access denied");
 
            if (right == DbManager.R_REMOVE && conf.indexOf("remove") >= 0 )
              throw new AccessDeniedException("access denied");
          }
          // set new acl if needed
          if (f.getNewConfidential() != null)
            f.setConfidential(f.getNewConfidential());
        }

        @Override
        public void hasReadAccess(DbManager dbManager, Table table,
            DbConnection con, de.mhus.lib.sql.DbResult ret) throws AccessDeniedException {
         
          try {
            String conf = ret.getString( dbManager.getNameMapping().get("db.Finances.Confidential").toString() );
            if ( conf != null && conf.indexOf("read") >= 0 ) {
              throw new AccessDeniedException("access denied");
            }
          } catch (Exception e) {
//            e.printStackTrace();
            throw new AccessDeniedException(e);
          }
        }
       
      };
    }
View Full Code Here

TOP

Related Classes of de.mhus.lib.adb.AccessDeniedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.