Re: User Access Rights

2009-05-16 Thread Greg Guerin
It's a bit primitive but you could issue the 'id' shell command via NSTask and scan the reply for '80(admin)'. It's also needlessly convoluted. The 'id' command isn't using magic. There are library functions and system calls for this. See: man getgroups man getegid -- GG

Re: User Access Rights

2009-05-15 Thread jonat...@mugginsoft.com
On 15 May 2009, at 22:05, iseecolors wrote: This looks perfect, except (and I hate to say this), I need a solution that works on 10.4 too. Thank you for all the help. Rich Collyer It's a bit primitive but you could issue the 'id' shell command via NSTask and scan the reply for '80(admin

Re: User Access Rights

2009-05-15 Thread jonat...@mugginsoft.com
On 15 May 2009, at 20:15, iseecolors wrote: Actually the only reason I want to know is that tech support wants to know when a user calls in. I just want to place some text in the UI, so that indicates whether the user has admin rights or not. Rich Try the Identity Services Programming

Re: User Access Rights

2009-05-15 Thread iseecolors
This looks perfect, except (and I hate to say this), I need a solution that works on 10.4 too. Thank you for all the help. Rich Collyer On May 15, 2009, at 12:38 PM, jonat...@mugginsoft.com wrote: On 15 May 2009, at 20:15, iseecolors wrote: Actually the only reason I want to know is that

Re: User Access Rights

2009-05-15 Thread I. Savant
On Fri, May 15, 2009 at 3:36 PM, Ken Thomases wrote: >> In this case, I *think* Directory Services can help. I may be wrong. >> Worth a search, though. > > Or possibly the new Identity Services API. http://developer.apple.com/documentation/Networking/Conceptual/IdentityServices_ProgGuide/Introdu

Re: User Access Rights

2009-05-15 Thread Ken Thomases
On May 15, 2009, at 2:21 PM, I. Savant wrote: On Fri, May 15, 2009 at 3:15 PM, iseecolors wrote: Actually the only reason I want to know is that tech support wants to know when a user calls in. I just want to place some text in the UI, so that indicates whether the user has admin rights

Re: User Access Rights

2009-05-15 Thread I. Savant
On Fri, May 15, 2009 at 3:15 PM, iseecolors wrote: > Actually the only reason I want to know is that tech support wants to know > when a user calls in. > > I just want to place some text in the UI, so that indicates whether the user > has admin rights or not. In this case, I *think* Directory S

Re: User Access Rights

2009-05-15 Thread iseecolors
Actually the only reason I want to know is that tech support wants to know when a user calls in. I just want to place some text in the UI, so that indicates whether the user has admin rights or not. Rich On May 15, 2009, at 12:02 PM, Kyle Sluder wrote: On Fri, May 15, 2009 at 2:33 PM, ise

Re: User Access Rights

2009-05-15 Thread Kyle Sluder
On Fri, May 15, 2009 at 2:33 PM, iseecolors wrote: > I am looking for how to determine if a given user is allowed to Administer > the host computer or not.  I am guessing that there is something similar to > CFPreferencesCopyValue or NSUserName that I can use to determine this > information. Don'

User Access Rights

2009-05-15 Thread iseecolors
I am looking for how to determine if a given user is allowed to Administer the host computer or not. I am guessing that there is something similar to CFPreferencesCopyValue or NSUserName that I can use to determine this information. Any hints ? Rich Collyer __