• 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: What's the official way to detect a user has administration privileges?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's the official way to detect a user has administration privileges?


  • Subject: Re: What's the official way to detect a user has administration privileges?
  • From: Stephane Sudre <email@hidden>
  • Date: Wed, 25 Jun 2008 17:31:14 +0200


On Jun 24, 2008, at 21:49, Stephen J. Butler wrote:

On Tue, Jun 24, 2008 at 5:32 AM, Stéphane <email@hidden> wrote:
What's the official way to detect a user has administration privileges (from
a Mac OS X point of view)?


OpenDirectory (how?) or does the fact that the user belongs to group admin
is enough (with the exception of root)?

The best way to do what you want is to use the Authorization Services AuthorizationCopyRights:

<http://developer.apple.com/documentation/Security/Reference/ authorization_ref/Reference/reference.html#//apple_ref/doc/uid/ TP30000826-CH1g-F17549>

Check for the "system.privilege.admin" right.

Trying to get Extended Rights for "system.privilege.admin" fails for users with "Allow user to administer this computer" turned on. The error states that it fails because it requires interaction. This is probably to request the user to enter his admin password.


So unfortunately, this does not look like to be a solution.

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


  • Follow-Ups:
    • Re: What's the official way to detect a user has administration privileges?
      • From: "Stephen J. Butler" <email@hidden>
References: 
 >What's the official way to detect a user has administration privileges? (From: Stéphane <email@hidden>)
 >Re: What's the official way to detect a user has administration privileges? (From: "Stephen J. Butler" <email@hidden>)

  • Prev by Date: Re: What's the official way to detect a user has administration privileges?
  • Next by Date: Re: What's the official way to detect a user has administration privileges?
  • Previous by thread: Re: What's the official way to detect a user has administration privileges?
  • Next by thread: Re: What's the official way to detect a user has administration privileges?
  • Index(es):
    • Date
    • Thread