• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: LDAP and Enterprise Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LDAP and Enterprise Objects


  • Subject: Re: LDAP and Enterprise Objects
  • From: "Albert Jagnow" <email@hidden>
  • Date: Fri, 21 Jan 2005 15:07:29 -0600
  • Importance: normal
  • Priority: normal

I have also run into this problem. I don't know if this is the best example or solution, but I have an application that checks authority based on a users group, the "memberOf" attribute in an Active Directory
LDAP directory. What I did was to have public class User extends _User, but then I commented out the generated methods for "memberOf" in _User that had this problem and rewrote other methods in my User class. For example (this is a simplified version of my code):


public boolean userHasAuthority(){
NSArray groupListArray = (NSArray)user.valueForKey("memberOf");
if(groupListArray != null){
Enumeration en = groupListArray.objectEnumerator();
while(en.hasMoreElements()){
String group = (String)en.nextElement();
if(group != null && group.equals( restrictAccessToGroup() )){
return true;
}
}
}
return false;
}



--Albert

On Jan 21, 2005, at 2:51 PM, William Norris wrote:

so you changed
   public class User extends _User
to
   public class User extends EOGenericRecord


or did you change your EOModel to have a classtype of EOGenericRecord instead of User (or whatever class it is)?



On Fri, 21 Jan 2005 12:42:48 -0800, Chuck Hill <email@hidden> wrote:
Yes, I've run into this.  I left the base class as an EOGenericRecord
and wrote my own cover methods as you note below.  Otherwise, you will
need to create new methods names as Java does not allow overloading
based on return type.

Chuck


On Jan 21, 2005, at 12:36 PM, William Norris wrote:


I use WOGen to create my EO Classes. The method signature for the mail accessor is "public String mail()". I could override this
method
and put the above custom logic in it, except that it would have to
have an identical signature -- returning a String.  the only other
thing i could think to do is create a new method "mailArray" that
ignores the auto-generated mail() method altogether.

Has anyone else run into this?  What did you do?

--
Practical WebObjects - a book for intermediate WebObjects developers
who want to increase their overall knowledge of WebObjects, or those
who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden


This e-mail (including any attachments) is covered by the Electronic
Communications Privacy Act, 18 USC. 2510-2521. It is confidential and
may be legally privileged. If you are not the intended recipient, you
are hereby notified that any retention, dissemination, distribution, or
copying of this communication is strictly prohibited. Please reply to
the sender that you have received the message in error, and then delete
it. Thank you. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: LDAP and Enterprise Objects
      • From: William Norris <email@hidden>
References: 
 >LDAP and Enterprise Objects (From: William Norris <email@hidden>)
 >Re: LDAP and Enterprise Objects (From: Chuck Hill <email@hidden>)
 >Re: LDAP and Enterprise Objects (From: William Norris <email@hidden>)

  • Prev by Date: Re: LDAP and Enterprise Objects
  • Next by Date: WOXMLCoder
  • Previous by thread: Re: LDAP and Enterprise Objects
  • Next by thread: Re: LDAP and Enterprise Objects
  • Index(es):
    • Date
    • Thread