Re: standard user or admin user ?
Re: standard user or admin user ?
- Subject: Re: standard user or admin user ?
- From: Ken Thomases <email@hidden>
- Date: Thu, 16 Feb 2012 19:13:00 -0600
On Feb 16, 2012, at 3:10 PM, Jens Alfke wrote:
> On Feb 16, 2012, at 9:46 AM, Rajendran P wrote:
>
>> Is there any cocoa by which i can determine , if the logged in user is standard user or admin user ?
>
> I believe you just use regular POSIX APIs to determine whether the user is a member of the group named ‘admin’.
If what you really want to test is group membership, I think you're supposed to use the Identity Services framework (e.g. CBUserIdentity, CBGroupIdentity, etc.).
https://developer.apple.com/library/mac/#documentation/Networking/Conceptual/IdentityServices_ProgGuide/Introduction/Introduction.html
However, you should rarely test that. Instead, you should attempt to obtain the appropriate right for what you're trying to do. For that, use Authorization Services.
https://developer.apple.com/library/mac/#documentation/security/conceptual/authorization_concepts/01introduction/introduction.html
Regards,
Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden