try{ logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_EDITEDADMINISTRATORPRIVILEGES,"Error adding accessrule : " + resource + logrule + " to administratorgroup " + admingroupname + "."); }catch( RemoteException re){}
error("Can't add access rule:"+e.getMessage()); try { logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_EDITEDADMINISTRATORPRIVILEGES,"Error adding accessrule : " + resource + logrule + " to administratorgroup " + admingroupname + "."); }catch( RemoteException re){ error("Can't write log: ",re); }
    public void addAccessRule(Admin admin, String admingroupname, String resource, int rule, boolean recursive){      String logrule = " accept ";      if(rule == AccessRule.RULE_DECLINE)        logrule = " decline ";      if(recursive)         logrule = logrule + " recursive";       try{        (admingrouphome.findByPrimaryKey(admingroupname)).addAccessRule(resource,rule,recursive);        authorization.buildAccessTree(getAdminGroups(admin));               logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_INFO_EDITEDADMINISTRATORPRIVILEGES,"Added accessrule : " + resource + logrule + " to administratorgroup " + admingroupname + ".");      }catch(Exception e){        try{            logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_EDITEDADMINISTRATORPRIVILEGES,"Error adding accessrule : " + resource + logrule + " to administratorgroup " + admingroupname + ".");         }catch( RemoteException re){}              }    } // addAccessRule