public static ORole createRole(String name,String inheritedRoleName){
ODatabaseRecordTx db = DbHelper.getConnection();
ORole inheritedRole = db.getMetadata().getSecurity().getRole(inheritedRoleName);
final ORole role = db.getMetadata().getSecurity().createRole(name,inheritedRole.getMode());
role.getDocument().field(FIELD_INHERITED,inheritedRole.getDocument().getRecord());
role.save();
return role;
}
public static ORole createRole(String name,ORole.ALLOW_MODES mode,Map rules){
ODatabaseRecordTx db = DbHelper.getConnection();