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 protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to