directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Kyrmegalos <andrea...@vivodinet.gr>
Subject Re: Unable to make ACI to work
Date Mon, 16 Jun 2008 18:10:42 GMT
Hello once more,

  I was inserting/removing whitespaces myself and finally got it 
working. Thanks for pointing it out anyway Ersin. Has there been any 
improvement on this area in version 1.5? Or perhaps something planned 
for version 2.0? It can be very frustrating trying to figure out where 
whitespaces are needed, and the ACI system is an essential part of a 
directory service. I'm thinking out loud here, but wouldn't it be more 
practical and less error prone to setup aci settings using an extended 
javax.naming.directory.Attribute class? A prescriptiveACI entry would 
look something like this:

Attribute prescriptiveACI = new BasicAttribute();
Attribute prescriptiveACIentry1 = new prescriptiveACIAttribute();
prescriptiveACIentry1.setID("anID");
prescriptiveACIentry1.setPrecedence(11);
prescriptiveACIentry1.setUserFirst(true);
prescriptiveACIentry1.setUserClasses(new 
userClass("uid=xxxx,ou=xxxxx,o=xxx"));
                          OR
prescriptiveACIentry1.setUserClasses(userClasses);//userClasses is a 
collection
Collection<Tuples> tuples = new ArrayList<Tuples>();
Collection<ProtectedItems> pi = new ArrayList<ProtectedItems>();
pi.add(new ProtectedItem(PROTECTEDITEMS.entry);
pi.add(new ProtectedItem(PROTECTEDITEMS.allUserAttributesTypesAndValues.);
Collection<GrantsAndDenials> gad = new ArrayList<GrantsAndDenials>();
gad.add(GRANTSANDDENIALS.grantAdd);
gad.add(GRANTSANDDENIALS.grantRemove);
tuples.add(new Tuples(pi,gad));
prescriptiveACIentry1.setTuples(tuples);
prescriptiveACI.add(prescriptiveACIentry1);

This way looks a lot more clean, a lot more Java is a lot less error 
prone and doesn't deviate from the essence of the X.501 spec. Thoughts 
anyone?

Regards,
Andreas

Mime
View raw message